How can I restrict typing

Hi Experts,
Usually, the validation is working when we press the “Next” button of the App. Is it possible to restrict typing validation?

For example. I want to set the ID between 1001 to 3999. I can easily set that range from validation criteria. But I want that, no one can type more than 4 digits, and also the range will be 1001 to 3999. That means typing length will be a maximum of 4 digits.

Another example, I want to set a mobile number of 11 digits. we can use: regex(., ‘^[0-9]{11}$’)
It works only when we press the “Next” button from App. But I need, no one can type more than 11 digits. So maximum typing length will be 11 digits.

@tanzilhuda, if you check the validation settings from your Collect android app under the SETTINGS>Form management>Constraint processing, you will see two options:

  • Validate upon forward swipe
  • Defer validation until finalized

This means you will not be able to validate upon entering. You will need to wait until either swiping to the next question or until your forms are completed.