-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi sir,
The Below given Constrain for email, If i Enter empty string it's shows validation popup,in this case i need to disable popup of email constrain and remove mandatory field,How to do? Validation work only when i enter any String only,but here two ways display popup.
Please give me suggestions.I am new in ZK.
<label class="bold">Email</label>
<textbox id="emailid"
constraint="/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/: Please enter an e-mail address">
</textbox>
First of all, regex is widly used, not only zk.
Now for your problem :
constraint="/^$|\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/: Please enter an e-mail address"
where ^$
stand for empty string and |
for OR.
Greetz chill.
Asked: 2014-04-02 19:14:54 +0800
Seen: 13 times
Last updated: Apr 03 '14
Zk Textbox constraint fire only once
Validate datebox invalid input with validators
MVVM, How to display @validator error like the constraint attribut error ?
Selectbox - constraint="no empty" not working
Add dollar Sign ($) to textbox constraint.
How to restrict button click when textbox input violates the constraint
unwanted logging of custom WrongValueException
Java Script error zk.wpd in Explorer