-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am currently using this textbox constraint to allow 6 figure numbers with up to 3 decimal places.
<textbox id="bal" maxlength="11" constraint="/^[0-9]{1,6}(?:[.][0-9]{1,3})?$/"/>
So I can enter up to 999999.999. However, I want to allow for a $ sign to be entered before the number. How do I add that to the constraint?
How about this? It is optional to enter a dollar sign in front:
^\$?[0-9]{1,6}(?:[.][0-9]{1,3})?$
if it should always be in front, just remove the "?"
Asked: 2016-05-17 18:22:43 +0800
Seen: 16 times
Last updated: May 18 '16
How to Disable Mandatory Constraint for email textbox
Zk Textbox constraint fire only once
How to restrict button click when textbox input violates the constraint
unwanted logging of custom WrongValueException
Java Script error zk.wpd in Explorer
wrong valueException come in front of modal popup [closed]
textbox constraint="no empty", how to cancel ? [closed]
[solved]textbox constraint="no empty", how to cancel it?
Validate datebox invalid input with validators
MVVM, How to display @validator error like the constraint attribut error ?