I wrote this code:
if (!prefix.match(/^[+][0-9]+\s[0-9]+$/)){
Xrm.Page.getControl("phone").setNotification("Please write a valid phon number");
}
else
(prefix.match(/^[+][0-9]+$/)) { ??? }
In if
, I define that in the field phone number, the number should be written like this : +49 15792423
Now I want to say, if somebody write the phone number like this: +4915792423
, it should put automatically a space between 9 and 1.
So can one of you please write the new code?
Best Regards