Hallo everybody,
I'm searching for an option to validate fields in Dynamics. For example I want to:
- ensure that in an e-mail adress an @ sign is
- ensure that a phone number starts with +
and so on...
How can I solve this?
Best Regards,
Hannes
*This post is locked for comments
Hi, I wonder if you can advise:
I have an email field with the default validation that works like a charm on the webform, however on the mobile app its coming back with the error if email format is not:
somethin@email.com.au (dot and two letters). If I enter the email address as something@yahoo.com - it always comes back with "please enter valid email address"
Is this something to do with the location settings?
Thanks in advance
I dont think it is possible in that way. but you can limit the digit by giving max and minnimum number in business rule.
You can use this piece of code to validate Phone number.
Call this function onchange of Phone number field
function PhoneNumberValidation() {
debugger;
var PhoneNumber = Xrm.Page.getAttribute("naaz_phonenumber").getValue();
alert(vehicleNumber);
var reg = /Keep Your Mobille number format regular expression here/;
if (PhoneNumber != null) {
if (reg.test(vehicleNumber)) {
alert("Valid");
}
else {
alert("InValid");
}
}
}
Hey,
Can I use something instead of JavaScript? For example a business role or something like that?
Thanks
For the email address, just use the Email Address format of the text field. That will add it's own validation.
For the phone number, create a JavaScript function called validatePhoneNumber(phoneNumber)
Then there are a few options, you can validate on the OnChangeEvent of each phone number field, or you can validate all the phone number fields on the OnSave event of the form.
You can use either JavaScript or regular expressions to check the validity of your fields.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,151 Super User 2024 Season 2
Martin Dráb 229,993 Most Valuable Professional
nmaenpaa 101,156