Password length
function Pass_len(elem, helperMsg)
{
if (pass1.value !== "" && pass2.value !== "")
{
if (pass1.value.length < 6)
{
strErrorMsg = strErrorMsg + helperMsg + "\n";
}
else
{
}
}
}This code use for set password length in this code password length is if less then 6 then error accord.
Your password is to small.
Password length is 6 (1234567). (it's correct format)
Email Validation
function validateEmail(elem, helperMsg)
{
if (elem.value !== "")
{
var email = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
if (!(elem.value.match(email)))
{
strErrorMsg = strErrorMsg + '' + helperMsg + "\n";
}
}
}This code in check email address if Your email is wrong then error accord.
Email Like: [email protected] (it's correct format)
Phone number validation
function ValidMno(elem, helperMsg)
{
if (elem.value !== "")
{
var phone = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
if (!(elem.value.match(phone)))
{
strErrorMsg = strErrorMsg + '' + helperMsg + "\n";
}
}
}This code in check Mobile number if Your mobile number is wrong then error accord.
Thank You
