verification of mobile phone number (13 start and 158,159, total 11 digits)
var Ss=document.getelementbyid (' TextBox3 '). Value;
var re=/^ (13[0-9]{9}) | (15[89][0-9]{8}) $/
if (Re.test (ss))
{
document.getElementById (' Label3 '). innertext= ""; Assigning a value to a label with innertext
}
Else
{
document.getElementById (' Label3 '). innertext= "Please enter the correct mobile phone number! ";
document.getElementById (' ImageButton1 '). Disabled=true; Disable button with disabled
}
Verification of the E-mail address (contains @ and.)
var re;
var Ss=document.getelementbyid (TEXTBOXID). value;
Re=/\[email protected]\w*\.\w/
if (Re.test (ss))
document.getElementById (' Label4 '). innertext= "";
Else
{
document.getElementById (' Label4 '). innertext= "Please enter the correct email address! ";
document.getElementById (' ImageButton1 '). Disabled=true;
}
Verification of ZIP code (cannot start at 0, total 6 digits)
var Ss=document.getelementbyid (' TextBox4 '). Value;
var re=/^[1-9][0-9]{5}$/
if (Re.test (ss))
document.getElementById (' Label5 '). innertext= "";
Else
{
document.getElementById (' Label5 '). innertext= "The ZIP code is not in the correct format! ";
}
var r=/^13[012345789]{9}/11 digits starting with 13, 9 digits cannot appear 6
JS Regular expression Verification phone number, email address and zip code