Text entry using numeric Custom Validation with matches regex | XM Community
Question

Text entry using numeric Custom Validation with matches regex

  • 6 July 2020
  • 5 replies
  • 384 views

Badge

Hello! I would like to condition the text field that numbers with 8-20 characters is accepted by matches regex ^[0-9]{8,20}$ . I tried but the validation can't be passed and the personal errror message can't be showed too. Please advise. Thanks much!
numeric Custom Validation.jpg


5 replies

Badge

Thanks for your reply. The second question is answered wrongly but the error message don't show. Also, please help solve the problem of old Look & Feel editor. Thanks a lot!

Userlevel 7
Badge +27

The error message you are getting is because you didn't answer the first question. Looks like you must have force response turned on.

Badge

https://www.qualtrics.com/community/discussion/comment/27564#Comment_27564Hello, I'm grateful to have you help me solve the above problems. Thanks a million.

Badge

https://www.qualtrics.com/community/discussion/comment/27525#Comment_27525Yes, you're right! But even 8 characters is filled, the validation can't pass and my personal error message can't show. Also, I changed the colors of "Error" & "Highlights" under old Look & Feel editor but it doesn't work. Please advise. Thanks much.
numeric Custom Validation_screencap_3.jpg

Userlevel 6
Badge +18

Hi PAU_OUHK ,
If i understood your problem statement correctly, you want respondent to enter numeric responses which would be in 8-20 characters in length.
In this case, yes, the regular expression which you have written is absolutely correct.
Also, the input which you have provided in the screenshot (111) i believe it failed because it has character length less than 8 and you are validating the responses which are between 8-20.
Let me know if my understanding is correct here?

Leave a Reply