I'm using Zurb Foundation and I'm trying to make custom combo email/domain name validation using abide validation. On a registration form i need to validate 2 input fields (Email and website Url), the email address must match with the domain suffix. and contemporary block common public domains emails account (google, yahoo, msn etc) from registering.
Asked
Active
Viewed 82 times
0
-
Nothing yet, i'm a newbie in Regex – lincolnpixel Nov 30 '15 at 15:43
-
What is your question? What problems are you facing? What have you tried so far? Your question right now is not clear. – Jorge Campos Nov 30 '15 at 16:08
-
Sorry if i wasn't clear enough... i need a pattern to match the email domain suffix with the url inserted in the website field as you can see on the attached screenshot. Thanks. – lincolnpixel Nov 30 '15 at 16:13
1 Answers
0
Regex isn't the tool for this, you should have a config file containing the "banned" domains and then scan through that list. This way you can change the list without needing to change your website code.
Even once you move past that though you should read this question and the answers which explains why regex validation of email addresses is very hard: Using a regular expression to validate an email address