Hi There,
I have applied phone validation on my lead form using java-script and its working fine but the problem is as I do ok on alert(phone number invalid) the forms get save, i have applied Javascript on save of from. Below is the code that I have wrote.
function ValidatePhoneNumber() {
var mobilenumber =Xrm.Page.getAttribute("telephone1").getValue();
if (mobilenumber !=null && mobilenumber !=undefined) {
var phoneno =/^(\+?)(1?\s?)\d{10}$/;
if(!phoneno.test(mobilenumber)){
alert("phone number invalid");}
}
}






