Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to apply livevalidation to classes for multiple dynamically created inputs? #22

Open
oshihirii opened this issue Jul 12, 2014 · 0 comments

Comments

@oshihirii
Copy link

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 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 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant