Reputation: 372
I'm trying to validate an input field which is 'disabled' when the page loads, but it will, somehow, become visible and editable.
I excluded [disabled] from parsley, but when I'm trying to refresh constraints on that field, nothing is working. I tried to call addValidation() when the field appears but no success.
Is there any method to do this? I can't destroy the form (that's not working either).
Upvotes: 1
Views: 1165
Reputation: 372
Found out how to do this.
Just call _refreshFields()
on your form.
$('form').parsley()._refreshFields()
Upvotes: 1