I am trying to limit the response to have 9 numbers for ID

i am trying to limit the response to have 9 numbers for ID…
I used to different equations like
regex(., ‘[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]’)
regex(.,’[\d]{9,9}’)
it limited the number not to be less. but accepts more than 9 digits.
how can i solve this?

Maybe you could do the same as outlined in the image shared below:

In the survey tab of your xlsform:

Image 1

Data entry screen as seen in Enketo: when a wrong entry is made

Data entry screen as seen in Enketo: when a correct entry is made

Reference xlsform:

Number (Regex).xlsx (10.2 KB)

1 Like