I'm using parsley.js (parsleyjs.org) in combination with acc-wizard.js ( http://sathomas.me/acc-wizard/ ).
Is there a way to make parsley check only a certain region (see following code, eg region one
, which could contain 5 input fields) instead of the whole form?
<form>
<div id="one">fields for parsley.js to validate...</div>
<div id="two">fields for parsley.js to validate...</div>
<div id="three">fields for parsley.js to validate...</div>
</form>
Thanks!
Good news, Parsley2 now have a group
option that allows to define different areas on a form and validate them separately :)
You can initiate Parsley via JavaScript so that you can pass in custom options. Then you can just use the excluded param to remove whichever sections of the form you don't wish to validate.
$('form').parsley({
excluded: '.two input, .three input'
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.