-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone, I have already the email constraint in the textbox whats working fine. Now its a field private emailadress and we have some users that like to enter there our compagny emailadress.
Thats not the reason why that field is there so we want to filter our domain out with the regex.
so whats allowed :
[email protected]
[email protected]
...
not allowed :
whats done with the original regex and :
[email protected]
our textbox atm:
<textbox value="@bind(fx.privateEmail)" id="email" width="250px" constraint="/.+@.+\.[a-z]+|/: Please enter a valid e-mail address" type="email" placeholder="External address possible" />
already found it :
.+@(?!mycomp\.com)(.+\.[a-z]+|)
so this would be that :
<textbox value="@bind(vm.confirm)" id="confirm_email"
width="250px"
constraint="/.+@(?!mycomp\.com)(.+\.[a-z]+|)/: Please enter a valid e-mail address"
type="email" placeholder="External address possible"
disabled="@load vm.confirm eq fx.privateEmail)" />
Its a simple validator that not do all the correct and incorrect one.
You can check the working here :
Asked: 2013-12-13 11:09:57 +0800
Seen: 5 times
Last updated: Dec 13 '13
ZK + Hibernate validation using JSR
howto change Datebox format error message
Session Timeout on Upload Button [closed]
ZK MVVM Validation Focus on First Error
how to clear validation messages
Create Crud of a User that has a collection of books
could binder.sendCommand return a result of Validation?
validate before more than one function
How to Disable Mandatory Constraint for email textbox
Validation on combobox. How can I rollback a selected comboitem if validation failed? [closed]