Client Validation Sample
Text size validation
Validates the provided text.

Eg: The value must have in a minimum 3 characters and a maximum of 8. 
Numbers only validation
Validates the provided numbers.

 Eg:  Only numbers are accepted. 
Email validation
Validates the provided email.

 Used regex.:
 
 
^[A-Za-z0-9](([_\.\-]*[a-zA-Z0-9]*)*)@([A-Za-z0-9]+)(([_\.\-]*[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$"
URL validation
Validates the provided URL.

 Used regex.:
 
 
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#()?&//=]*)
Custom validation regex
Validates using a custom regex.
 
Eg.:
 
?=(.*[0-9]))((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.{8,}$
Should have 1 lowercase letter, 1 uppercase letter, 1 number, and be at least 8 characters long
Custom validation function
Validates using a custom javascript function.

Eg.:
 
function TestValidation(source, arguments){
    var value = $('#' + source.controltovalidate).val();
    if(value == "test"){
        source.errormessage = "You can't type test!";
        arguments.IsValid = false;   
    }
Submit 
Click here to see your activities