Message for Content Validation Phone Number | XM Community
Solved

Message for Content Validation Phone Number

  • 18 October 2019
  • 1 reply
  • 67 views

Userlevel 7
Badge +26
  • QPN Level 4 ●●●●
  • 216 replies
Hi,
I want to add Content validation on a field meant for a phone number.
There is a phone number validation for "NL Phone number", but it does also suit for BE Phone numbers.
However, the error message shown when you put in an invalid number, is then "Please enter a valid NL phone number".
Is there any way to adjust the shown error message to just "Please enter a valid phone number"?

I could use custom validation with a custom message, but the standard role does fit and it's hard to figure out what the standard rule looks like in the background, as both 0476111111 as +32476111111 are (correctly) valid.
icon

Best answer by ClairJ 18 October 2019, 17:46

View original

1 reply

Userlevel 5
Badge +15
Hi @JoycaV , based on this help page, it looks like customizing the validation message is only possible if you are using custom validation. I'd recommend a few things...

1. Try posting this in the developer corner to see if someone can do this with code.
2. Use custom validation instead, with Regex used to set up the format you want. There is a Regex library here (I've linked you specifically to phone number formats). Then, you'll be able to update the error message.
3. Post this to Product Ideas! I love the idea of being able to update the validation message for all kinds of validation. I will upvote the idea. 🙂

Hope this helps - let me know if you have follow-up questions!

Leave a Reply