How do I create a validation where I need to enter a study ID that has letters and numbers | XM Community
Skip to main content
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
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!!!