27/08/2014

JavaScript-Validation Script

| |
0 comments
JavaScript-Validation Script


 
 
 
 
email validation:


/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

******************************************************************************

Alphabets, numbers and space(' ') no special characters min 3 and max 20

characters.

var ck_name = /^[A-Za-z0-9 ]{3,20}$/;

******************************************************************************

Supports alphabets and numbers no special characters except underscore('_') min 3

and max 20 characters.

var ck_username = /^[A-Za-z0-9_]{3,20}$/;

******************************************************************************

Password

Password supports special characters and here min length 6 max 20 charters.

var ck_password = /^[A-Za-z0-9!@#$%^&*()_]{6,20}$/;
Read More

Check Your Codes

Check the result of your (sample) HTML,CSS,JavaScript code.