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

Validate a dynamically added Input in Form #910

Closed
Caine85 opened this issue Jun 25, 2014 · 4 comments
Closed

Validate a dynamically added Input in Form #910

Caine85 opened this issue Jun 25, 2014 · 4 comments

Comments

@Caine85
Copy link

Caine85 commented Jun 25, 2014

I try to validate a form that have some input create dynamically with JQuery. The issue is that even if I add rules for the new input fields when I initialized the form, these inputs won't be validate.
There is a way to reinitialize the form adding new input to validating?
And then I don't know if this is desired but if I add few input with the same "data-validate" attribute only the first is validate.
Thank you so much for the attention!

@jlukic
Copy link
Member

jlukic commented Jul 1, 2014

I understand the issue, but can you please create a test case. It will help in verifying and debugging your issues.

There is a JSFiddle you can fork from the readme.

@Caine85
Copy link
Author

Caine85 commented Jul 1, 2014

Hi! This is a JSFiddle: http://jsfiddle.net/Caine85/d62T8/
If I add a new input field and press submit the new added input isn't validate.
Thank you for the support!

@ming300
Copy link

ming300 commented Jul 1, 2014

@jlukic
Copy link
Member

jlukic commented Jul 1, 2014

Yes, re initializing a form after adding a new element will fix any issues.

Thanks @ming300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants