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

How to ask for and limit entry of 4 digits

  • May 31, 2021
  • 2 replies
  • 417 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

Best answer by ahmedA

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

2 replies

Forum|alt.badge.img+8
  • Level 2 ●●
  • June 1, 2021

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


Forum|alt.badge.img+22
  • Level 7 ●●●●●●●
  • Answer
  • June 1, 2021

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