Disable and enable validations
Documentation updated on December 6th.
Create your validations
First, you'll initilize the Validations that you will use in your project.
In this case, we'll create a
var requiredVal = $(".field-req").required("This field is required.");
Disable a validation
To disable this Validation, you only must use the
disable method. Therefore, the next time that you run validation, this Validation will not execute.
Enable a Validation
Now, if you want to enable it again, you must use the
Toggle a Validation
If you want to enabled or disabled a validation, you must use the
requiredVal.toggleEnable(); // Now, it's disabled requiredVal.toggleEnable(); // It's enabled again.