Hello, I would like to set validation setting in one question such that enumerator has to enter information in following format
xxx-xxCxxxxx
where x is digits
- special char
C- letter
how can i set such validation in response
Hello, I would like to set validation setting in one question such that enumerator has to enter information in following format
xxx-xxCxxxxx
where x is digits
how can i set such validation in response
You can use a regex() to check the entered string matches the required format. Try something this:
constraint="regex(.,'^[0-9]{3}-[0-9]{2}C[0-9]{5}$')"
This a related thread about regex’s.
6 posts were split to a new topic: Creating a validation for only the first character/text using regex