Expand my Community achievements bar.

numeric pattern for positive values only

Avatar

Former Community Member
What pattern must be set to disallow users input negative values?
2 Replies

Avatar

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

Avatar

Former Community Member
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!