E-mail verification phone number

// Required background color of the phone number are mandatory
function invoicedt () {
var areaSum = document.getElementById ( "PHONE_NUMBER") value;.

IF (!! = Null areaSum || areaSum = "") {
document.getElementById ( " PHONE_NUMBER ".) style.backgroundColor =" White ";
}
IF (== null || areaSum areaSum ==" ") {
// $ messager.alert ( 'prompt', 'telephone number is required!");
document.getElementById ( "PHONE_NUMBER") style.backgroundColor = "# fff3f3";.
}

}
// set the mailbox is mandatory
function invoicedtEimal () {
var areaSum = document.getElementById ( "email_no") value;.

IF (!! = Null || areaSum areaSum = "") {
document.getElementById ( "email_no") = .style.backgroundColor "White";
}
IF (== null || areaSum areaSum == "") {
// $ messager.alert ( 'prompt',. "phone is required"!);
document.getElementById ( "email_no") style.backgroundColor = "# fff3f3";.
}

}

// verify mailbox
function emailLimit () {

var In Email = $ ( "# email_no") Val ();.
IF (!! = Null && In Email "" In Email =) {
var RET = / ^ ([A-z0- .? 9A-Z] + [ -_ | \]) + [a-z0-9A-Z] @ ([a-z0-9A-Z] + (- [a-z0-9A-Z] +)? . \) + [a-zA-the Z] {2,} $ /;
(! ret.test (in email) IF) {
$ .messager.alert ( "prompt", "! Please enter the correct format mailbox", " info ");
$ (" # email_no ") Val (." ");
}
}
}

// add mailboxes verification
function checkEmail () {
var In email = $ (" # email_no ") Val ();.
IF (null! In Email && = ""! = In Email) {
var RET = /^([a-z0-9A-Z]+[-_|\.]?)+[a-z0-9A-Z]@([a- the Z-z0-9A] + (- [the Z-A-z0-9A] +) \) + [A-zA-the Z] {2,} $ /;?.
IF (ret.test (In Email!)) {
$ .messager.alert ( "prompt", "Please enter a properly formatted e-mail!", "info");
. $ ( "# email_no") Val ( "");
}
}
}

// add phone verification
function mblLimit () {
var mblNo = $ ( "# PHONE_NUMBER") Val ();.
IF (!! = Null && mblNo "" = mblNo) {

var RET = / ^. 1 (. 3 [0-9] |. 4 [57 is] |. 5 [0-35-9] |. 7 [0,135,678] |. 8 [0-9] |. 9 [0-9]]) \ {D} $. 8 /;
IF ( ! ret.test (mblNo)) {
$ .messager.alert ( "prompt", "Please enter a properly formatted phone!", "info");
$ ( "# PHONE_NUMBER") Val ( "");.
}
}
}

Guess you like

Origin www.cnblogs.com/xianz666/p/12124929.html