Create custom validation for participant ID | XM Community
Skip to main content
Answer

Create custom validation for participant ID

  • July 3, 2018
  • 1 reply
  • 27 views

I am trying to create a custom validation for my participant ID field. The ID is put together by the first letter of the name of mother, the last letter of name of father, the month of birthday and the first and last letter of birthplace, e.g. MS06KN. I have tried to create a regex that will only allow responses in this format but have failed so far. Can someone please help? Many thanks in advance!

Best answer by TomG

Try ^[A-Z]{2}[0-9]{2}[A-Z]{2}$

1 reply

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • Answer
  • July 3, 2018
Try ^[A-Z]{2}[0-9]{2}[A-Z]{2}$