You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an input which can be cloned and only has a class to identify it (as there cannot be more than one id with the same name).
I am trying to apply the Presence and Numericality constraints to the input, but it's not working because I am trying to use a class and not an id. Are there any ways around this?
What I've Tried
var myVariable = new LiveValidation('.my_class', { validMessage: 'valid input', wait: 500});
myVariable.add(Validate.Presence, {failureMessage: "required field"});
myVariable.add( Validate.Numericality );
The text was updated successfully, but these errors were encountered:
Scenario
I have an input which can be cloned and only has a class to identify it (as there cannot be more than one id with the same name).
I am trying to apply the
Presence
andNumericality
constraints to the input, but it's not working because I am trying to use a class and not an id. Are there any ways around this?What I've Tried
The text was updated successfully, but these errors were encountered: