Mobile Number Validation :
Various nations have distinctive Mobile Number codes. For instance we as a whole have know in India Mobile Number Code resembles +91.Similarly every nation have their own Mobile Number Codes .
Here I unraveled All over nations Mobile Number Validation through JavaScript in Microsoft CRM structure.
function clientMobilePhone() {
debugger;
var mobilenumber = Xrm.Page.getAttribute("telephone1").getValue();
if (mobilenumber != null && mobilenumber != undefined) {
var pattern = /^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s.0-9]*$/;
if (mobilenumber.match(pattern)) {
Xrm.Page.getControl("telephone1").clearNotification();
}
else {
Xrm.Page.getControl("telephone1").setNotification("Invalid phone number");
}
}
}
0 Comments