2

In the new version of Parsley.js 2.0.0 rc3 how do you enable validation for dynamically added inputs?

Before I had destroyed the validation then re-initialized validation. However my understanding is you shouldn't have to do this in the new version, not sure if that is correct or not.

3 Answers 3

3

Try $("form").parsley().reset();

0

Well for now I have done the same thing as I did using version 1. After I add a new input I destroy and reset parsley on the form.

$("form").parsley().destroy();
$("form").parsley();
0

$('#fieldId').parsley('addConstraint', { required: true });

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.