Error in Kobo Collect

Hi,
I have created a field of mobile number and put the limitation using regex that it should have 10 digits. When I am previewing the form on web, it is working fine. But in Kobo collect, it is not accepting any digit beyond 9 digits.

Please help!

Hi @phiafoundation,

Would you mind having a look at the post discussed previously. It should solve your issue:

As a backup please feel free to have a look at our support article Restricting Text Responses With Regular Expressions which provides a wide range of practical examples using regex.

Have a great day!

Hello @phiafoundation ,
As discussed earlier in the forum, there is an essential difference in regex behaviour between Collect and Enketo. See here. and here.

1 Like

Hi,
I had put the same code. It is working fine in Enketo but limiting my digits to 9 in Kobo collect.
Also, I tried removing the digit limitation and check the form again on Kobo collect but the error still persist. This indicates that there is some issue with Kobo collect app.
I tried this in another numeric field which had no digit limitation. It is not accepting more than 9 digits in any numeric field even after having no digit limitation.

You cannot enter numbers longer than 9 digits (because this will overflow how integers are stored). Instead you need to use a text question with a numbers appearance setting. See https://docs.getodk.org/form-question-types/#number-text-widget

The integer widget has a limit of nine digits, and the decimal widget has a limit of 15 characters.

3 Likes

Thanks a lot.

1 Like