Problem with data validation on integer question

I have done a form in which there is a question “how many days did you work in the month of february 2020?” and the validation condition is that the interger value should be <=28, >=0.

I have two issues

  1. suppose I am doing the survey and for some reason I did not answer the above question and saved the form. when I go to edit forms in kobo mobile app, and try to enter the value 25 (any value satisfying the above condition), i get an error message saying 'invalid input. and when I swipe backwards and again swipe forward, It is taking the value as 25.

  2. Now suppose during the survey I have entered the value as 25 for the above question and when I go to edit forms and put 30 for the same question (I deliberately entered the value not satisfying the validation) I don;'t get the error messages saying invalid input because the validation criteria is not matched.

All the above issues are happening in kobo mobile android app and when I go to Edit saved forms.

My concern is why I am getting invalid response message when I enter the value satisfying the condition in first issue and why I am not getting the invalid input message when I enter the value not satisfying the condition.

Please Help me with this issue.

Thank you

You could create your xlsform with the following constraint (as shown in the image below) which should solve your issue:

This should help you solve your issue that you have outlined above.

Note: You will also need to make the response a mandatory one by typing TRUE under the required column. To learn more about the mandatory response you could also visit our previous post:

Reference xlsform:

Constraint.xlsx (9.6 KB)

1 Like

Hello @rohith_kumar,
In addition of the solution of @Kal_Lam, could you provide here an extract of your form who caused the strange behaviour, please. This might help to review the case.

2 Likes