emailValidate(value, required)
value(Email value)
required(Required field: true, false)
Example:
emailValidate('abc@abc.abc', true) // If field is required
----return bool
emailValidate('abc@abc.abc', false) // If field is not required
----return bool
Password Validation
Call passwordValidate function with following parameters
var response = passwordValidate(passwordValue, minlength, maxlength, required)
Example
passwordValidate('abc123_', 4, 8, true)
----- return bool
# Call passwordValidate function with following parameters
var response = passwordValidate(passwordValue, patternType, required)
Example:
passwordValidate('abc123_', "^(?=.*[0-9]+.*)(?=.*[a-zA-Z]+.*)[0-9a-zA-Z]{6,}
quot;, true)
---- return bool
patterns details: http://regexlib.com/Search.aspx?k=Password&AspxAutoDetectCookieSupport=1
Pattern Type:
//Validate with one character, one number and one special character(if there)
^(?=.*[0-9]+.*)(?=.*[a-zA-Z]+.*)[0-9a-zA-Z_@./#&+-]{6,8}$
// Validate with one Character, one Capital character, one special character and one number
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[#&^%$@!_*-]).{6,8}$
//Validate with character, number and no special character
(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{6,8})$
var response = panCardValidate(value, required)
Example:
panCardValidate('value', true)
-----return bool
([a-zA-Z]){5} -> Alphabets should be 5 in number.
([0-9]){4} -> Numbers should be 4 in number.
([a-zA-Z]){1} -> Alphabets should be 1 in number.