0

textbox constraint emailadress upgrade to disallow mycomp.com [closed]

asked 2013-12-13 11:09:57 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

updated 2013-12-13 11:11:24 +0800

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 :
chillworld@mycomp.eu
chillworld@yahoo.com
...

not allowed :
whats done with the original regex and :
chillworld@mycomp.com

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" />
delete flag offensive retag edit

The question has been closed for the following reason "the question is answered, right answer was accepted" by chillworld
close date 2014-02-10 13:37:51

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-12-13 11:51:02 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

updated 2013-12-13 11:51:54 +0800

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 :

http://regexpal.com/

link publish delete flag offensive edit

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-12-13 11:09:57 +0800

Seen: 5 times

Last updated: Dec 13 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More