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
BedrockMission!

Learn More

View all

Sign in to view all badges

Numeric patern

Avatar

19-12-2008

Is it posible into a numeric field, user to alow enter only 3 digits without using the combo future and also how to validate in case user enter less or more than 3 digits?



Thanks

Replies

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

19-12-2008

What is the combo future?



You can certainly restrict the field length to 3 chars. Using Validation Patterns you can ensure that you have 3 digits in the field or you can check the length of the field programatically by using javascript then display an appropriate message.

Avatar

19-12-2008

Thanks Paul for your help!

How javascript will look for the numeric pattern?



Thanks

Avatar

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Boost 500
Level 10
pguerett
Level 10

Likes

611 likes

Total Posts

7,689 posts

Correct Reply

692 solutions
Top badges earned
Boost 500
Boost 50
Boost 5
Boost 3
Boost 250
View profile
pguerett
Level 10

19-12-2008

You could use a regular expression (RegEXP) to check for a numeric pattern as well you coudl check the length.