Validate form inputs, select boxes, buttons, checkboxes, radio buttons and more. Simple and lightweight validation with customizable styles. Although written to work with browsers, it can run in any environment which supports JavaScript.
With inbuilt paarmeters, change the color and style of your error messages.It just takes a few minutes to do it and makes an impact on your customer service experience.
User experience may give cause to vary the levels of validation tests according to requirement.The Validation function helps in validating input parameters given in the form.
Validate your form data in a matter of seconds. Validate simple text fields,select boxes, buttons, checkboxes, radio buttons and more.
Get ready-to-use cached version of Surge Validator minified CSS and JS to your project
Get our unminified CSS and JavaScript
Customize Surge Validator with your own assets by downloading our source CSS and JS from our github
$('form').valid()
To validate name fields, add the class 'name' to the desired fields. For example;
This will let Surge Validator know that that field will accept only alphabetic characters and throw an error if a non alphabetic character is found.
| Input | Class | Id |
|---|---|---|
| - | ||
| Password | - | #password |
| Confirm Paasword (*optional) | - | #confirmpassword |
The .valid() function accepts one optional parameter; passwordStrict which has a default value of true. If left to default, Surge Validator will validate passwords strictly by checking first and foremost the length of the password and then check if it contains Alphabets (both upper and lower cases), Numbers, Special Characters and will return an error if the password entered fails to meet any of the given criteria.
However if set to false, Surge validator will onlycheck the length of the password and return an error if it is less than 8 characters. To change the default settings;
$('form').valid({
passwordStrict:false
})