Allow 4 numbers in the text box | XM Community
Skip to main content

Hi friends,
I'd like to ask participants to provide the last four digits of their mobile phone numbers.
For example: Phone number: 0938 42 62 42 => The last four digits: 6242
I choose Text => Content Valiadation => Number. However, I dont' want some situations such as:

  • Put only 1, 2, or 3 numbers. For example: 6 or 62 or 624

  • Space. For example: 62 42

  • Include other characters (. , - 😉. For example: 62.42 or 62-42

This is anonymous code which matchs their responses overtime, therefore, it should be correct to use logic display in the later surveys. What should I do to avoid these cases?

Thank you!

Matches regex:

^\\d{4}$


Leave a Reply