How do I create a validation where I need to enter a study ID that has letters and numbers | XM Community
Solved

How do I create a validation where I need to enter a study ID that has letters and numbers

  • 17 December 2018
  • 5 replies
  • 40 views

I need to create a validation that's 12 charters (letters and numbers). Can someone provide the right regex strip to provide into the custom validation box? Thank you
icon

Best answer by Anonymous 17 December 2018, 21:47

View original

5 replies

Hello @salmeida ,

Use this regex code: `^(?=.*[A-Za-z])(?=.*\\d)[A-Za-z\\d]{12}$`

The above will force respondent to enter 12 charters (letters and numbers)
Hi, thanks for you help but when I preview the survey it still doesn't work
> @salmeida said:
> Hi, thanks for you help but when I preview the survey it still doesn't work
>

I hope you are using match regex option in custom validation
Yes I am
!
Never mind it worked!! Thanks so much for your help!!!

Leave a Reply