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 pattern for positive values only

Avatar

11-06-2008

What pattern must be set to disallow users input negative values?

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

11-06-2008

Why not just use the absolute function in javascript to force the number to positive after it has been entered?

Avatar

12-06-2008

Hey Paul it's quite simple and good idea! I used something like this:



form1.#subform[0].NumericField1::exit - (JavaScript, client)

this.rawValue=Math.abs(this.rawValue);



And it works fine, Thanks!