victorjonsson / jQuery-Form-Validator

[DISCONTINUED] jQuery plugin that makes it easy to validate user input while keeping your HTML markup clean from javascript code.
973 stars 477 forks source link

Is it possible to re-initialize the validator after an ajax response which contains new html fields/inputs? #714

Open KnottA opened 5 years ago

KnottA commented 5 years ago

Hi. When i re-run the code below (for second time within the process of the ajax response) the submit button will trigger to the server even if the inputs has errors.. How can i fix this? Is there an easy way to re-initialize the validator when new fields have been loaded? $.validate({ lang: 'no', modules : 'security, logic' });

My form is a very long one and have a lot of extra content being loaded by ajax, I need a way to easy re-initialize these inputs.

Hope someone can help me :-)

victorjonsson commented 5 years ago

Could you show me a code example?