function validateEmailOrMobile(emailOrMobile) { var message = ""; var intRegex = /[0-9 -()+]+$/; debugger; if (intRegex.test(emailOrMobile)) { if (emailOrMobile.length != 10) { message = 'Please enter a valid mobile number.'; return message; } } else { var eml = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/; if (eml.test(emailOrMobile) == false) { message = "Please enter valid email address."; return message; } } return message; }
function IsMobileNo(emailOrMobile) { var message =false; var intRegex = /[0-9 -()+]+$/; if (intRegex.test(emailOrMobile)) { message= true; } else { message= false; } return message; }