简体   繁体   中英

How to Validate Form fields one by one with Parsley Js

I am trying to Validate a Form with Parsley JS But when I hit submit it's adding error class in all fields but I want that it should validate fields one by one.

So if the 5 inputs are required and I it submits without filling any of them so want to show error in the 1st input only. after that if i fill 1st input and left the other 4 then it should show error in the second input only. I am just using this code for my form now.

$('#formid').parsley( //nothing here for now );

Set a specific priority to each input in the order you want them validated. Parsley will stop validation as soon as an error is detected at a given priority level.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM