This script is usefull when you need users to be able to select only one checkboxes in pages same as radio button i mean if you have group of checkboxes and you want to force user to select only one checkbox at a time then you can use this script.
I know in many cases radio buttons are "ideal" but in some cases you will need this script to check only one checkboxes from group of checkboxes.
You'll see here the different protagonists involved and how you can configure them to fit your desired validation.
Of course, this documentation tries to be the most exhaustive possible and relatively easy to understand.
checkboxes), then you can specify validate Multiple and one of the other two.
Validating functions should return either otherwise. It can instead return a j Query promise that will be resolved if the value is valid, or be rejected otherwise.
For performance reasons, Parsley does not use j Query events, but the API to listen to events is very similar: By default, all 2xx ajax returs are considered valid, all others failure.
Sometimes (when a call is needed to see if an email, a pseudo is available for example) a 404 API answer could be the right answer. You have access to the plugin as well as the element if you need to perform other actions before returning the validation result.
You can specify what kind of requirement parameter your custom validator is expecting: as second and third arguments (the first one being the value(s) to validate).You have to manage these errors completely manually and they should be independant with other validations. Note that Parsley triggers events that allows Parsley UI to work.Further more, it could allow you to do some powerful magic if you listen properly to the right events!Current available plugins are in Extras for additional validators.Parsley is a decoupled library that uses different classes to do the heavy work.