Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Validate that user should not enter more than specified number of digits/chars?

Avatar

Level 8

Hello

First case: I have placed a TEXT field on the form. Now i want to put the below validation,

1) User has to enter only numbers (no decimals)

2) Only 10 digits

If not i need to

1) Alert app.alert

2) Make the field either CLEARIng or considering & resetting only the first 10 digits (if user entered more than 10 digits)

2nd case: Same as above, a TEXT field, but, the data is with a DECIMAL notation, the allowed lenghts are as

2 digits as prefix to decimal

2 digits as suffix to decimal position

example, 35.88

Pls. let me knw the Java Script for these 2 cases or do you suggest me PATTERN validation if so, can i CLEAR or reset  and if so, pls. let me know under which TAB(Display / Edit / Data) i need to put the PATTERN validation?

0 Replies