How to ask for and limit entry of 4 digits | XM Community
Solved

How to ask for and limit entry of 4 digits

  • 31 May 2021
  • 2 replies
  • 223 views

I am asking for 4 digits of an ID code. I've seen information on using "matches regex" but without enough detail regarding how to set this up in Custom & Content Validation. I found a code for: matches regex

^\\d{4}$. 
I can't find how & where to enter this. The menu requires multiple entries.

https://www.qualtrics.com/community/discussion/14926/allow-4-numbers-in-the-text-box was the answer I found but without sufficient specifics

icon

Best answer by ahmedA 1 June 2021, 13:26

View original

2 replies

Badge +8

You can find custom validation documentation from the link and then select regex validation and use ^\\d{4}$
https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/validation/#CustomValidation

Userlevel 7
Badge +21

You don't really need regex for this. Set the validation to accept number min: 1111, max:9999, demicals:0

Leave a Reply