Input. Process. Validate.

Validate form-fields & fieldsets easily.

Features

Validation checks are as powerful, reliable and customizable as the browser itself.

Lightweight and Simple

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.

Colors

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.

Customization

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.

Speed

Validate your form data in a matter of seconds. Validate simple text fields,select boxes, buttons, checkboxes, radio buttons and more.

Download

Download Surge Validator to get the minified CSS or JavaScript, source code or include it with your favorite package managers like npm, RubyGems, and more.

To use Surge Validator, jQuery must be installed as it is an important dependency.

Minified CSS and JS via CDN

Get ready-to-use cached version of Surge Validator minified CSS and JS to your project

    
        
        
    

Unminified CSS and JS

Get our unminified CSS and JavaScript

    
        
        
    

Source Files

Customize Surge Validator with your own assets by downloading our source CSS and JS from our github

Usage

To validate your form, simply add the '.valid()' method in your code. For example;

    
        $('form').valid() 
    

Validating fields

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.

Classes for various inputs
Input Class Id
Email .email -
Password - #password
Confirm Paasword (*optional) - #confirmpassword

Optional Parameters

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
        })
    

Examples

To validate your form, simply add the '.valid()' method in your code. For example;

Code