How to force user to enter exactly 3 digits in to a number field [message #501335] |
Mon, 28 March 2011 10:49 |
urnikhil
Messages: 42 Registered: March 2008
|
Member |
|
|
Hi All,
There is a text item on my form with NUMBER data type. I want to force the user to enter exactly 3 digits in to that text item. My current FORMAT MASK is set to 990. But this allows user to enter even a single digit where as my requirement is user should enter exactly 3 digits. Can we achieve this by changing the FORMAT MASK property? Please advise.
Thanks,
Nik.
NOTE: Sorry for posting the same message twice by mistake. I didn't find a way to delete one of these messages.
[Updated on: Mon, 28 March 2011 11:00] Report message to a moderator
|
|
|
|
|
|
|
Re: How to force user to enter exactly 3 digits in to a number field [message #501399 is a reply to message #501391] |
Mon, 28 March 2011 15:46 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
urnikhil wrote on Mon, 28 March 2011 15:27Joy,
Format mask 000 didn't work, even it allows single digit numbers. As per the requirement, the only valid entry in to that field is a 3 digit number. That is the reason I am trying to achieve this.
Really? A format mask of 000 would put leading zeroes for any number you put in the Form. What version are you using? I am 10.1.2.0.2.
I tried 1 and it gave me 001
I tried 45 and it gave me 045
I tired 123 and it gave me 123
like I said, it does not store leading zeroes in the database, only on the form. Is that what you want? On the form or in the database?
|
|
|
|