Hi @RayRay,
Try this out. It should work for you.
In the survey tab of your xlsform:
Data entry screen as seen in Enketo: (while trying to make a wrong entry)
Data entry screen as seen in Enketo: (while making a correct entry)
Reference xlsform:
Constraint Example.xlsx (9.6 KB)
Have a great day!