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

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

  • Dec 17, 2018 8:39 PM UTC
  • 5 replies
  • 85 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

Best answer by Anonymous

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)
View original

5 replies

  • Answer
  • Dec 17, 2018 8:47 PM UTC
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)

  • Author
  • Dec 17, 2018 8:54 PM UTC
Hi, thanks for you help but when I preview the survey it still doesn't work

  • Dec 17, 2018 9:04 PM UTC
> @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

  • Author
  • Dec 17, 2018 9:09 PM UTC
Yes I am !

  • Author
  • Dec 17, 2018 9:12 PM UTC
Never mind it worked!! Thanks so much for your help!!!