I have a form (demonstrated in attached page) that uses a button with the bootstrap-checkbox library (similar to toggle). It replaces a normal checkbox. However, when the form submits, I cannot get it to validate with parsley. The success condition for passing validation is when the button has the 'active' class (indicating checked) which is add/removed as the button is toggled.
This project should deliver:
1. A custom parsley validator that can check for the existence of one or more css classes.
2. A custom message tag using standard parsley message tagging syntax, such as 'data-parsley-hasclass-message'.
3. Working solution in the provided example form.
I have included a zip file that contains:
- [url removed, login to view]: example page that demonstrates parsley validation for 3 fields, the bootstrap-checkbox button, and the submit button.
- necessary css & js files.