I have a text field with a input mask (99-99-9999) and a hit (mm-dd-yyyy) where user inputs a DOB. This field is then used to calculate the Age of the person.
I'm trying to write a regex so that a month of 13 and day of 32 are not allowed and I can't seem to get the syntax correct in Survey 123 - it appears to be correct in online regex checkers....
The regex is as follows:
Am I missing something else?
Hey Ryan Evanczyk,
I tried out your regex in a super simple Survey123 form and it seems to work fine. I've attached the form. If you can upload your form I can take a look for you.
If this answer was helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.
The main reason is that it seemed easier to fill out a text field than the date question. We use web books to complete our forms - generally the user has the computer in their lap while they type. Using the touchpad mouse to adjust the dates (and times) was more difficult for people than just typing in the numbers. Specifically, with the dob question, what was difficult for people was spinning that wheel for the year.
This is the error I keep getting.
I should have mentioned earlier that our users are not always the most computer savy folks. This is the secondary reason for the text fields over the date and time fields - just typing the numbers is more straight forward for some of them.
There seem to be some extra (hidden) characters at the end of the constraint calculation. Deleting the closing parenthesis and re-typing it in got the form to work for me.
Just came across this, looks like there's a zero for the second month digit which would exclude October.