Only allow numbers and certain length in Appsheet text box

I want to restrict user to enter a 5 digits number in text field, since I need to check the length of input I cannot use Number as the data type. The data contains leading zero so I cannot not use text([Field]) to convert the number to text for processing.

I use the formula AND(Number([Field]) <> 0, Number([Field])<>"", Len([Field])=5)

However, when I input "abcde" it let me go through, but I checked with the test result, the formula actually returns False, then I simplify the formula to just Number([Field]) <> 0, the result is the same. False but let me pass through.

why it allow to pass with the valid_if is False? Did I do it in a wrong way? 

Please help, thanks in advance.

0 2 957
2 REPLIES 2
Top Labels in this Space