Regex for validating emails


30-Aug-2017 12:58

regex for validating emails-44

who is devon werkheiser dating 2016

In what world is not validating an email a good thing?

It's not like emails vary after a certain complexity is reached.

I hear and understand a lot of the comments on this thread mention that regex saves the user from a typo and such.

So I want to vouch for a github project called mailcheck[0] by the Kicksend team that's great.

For example, it catches [email protected], but it doesn't catch [email protected]

Of course, gmail is going to be the more common case.

Like I said, when you accept a credit card, normally you validate the formatting of the card before trying to charge money using the info. You must send them a confirmation link because you shouldn't be sending them email in the future unless you've had them confirm their address and that they want to receive email from you.

You appear (but perhaps I'm misunderstanding you) to be asking a user to enter their email address; checking that against a regex; storing it; and sending email to it. You potentially just lost a user and/or customer (or made them unhappy because now they have to register again)You're potentially losing customers because their valid email addresses are not validating through your broken regex; or their incorrect email is validating through your regex.

You use the Luhn algorithm which tells you if it's possible for that number to be valid or not. Also, don't attribute bad programming to me in your comments when you have no idea what regex I use - that's just rude and belligerent.

Still, it looks good overall and an improvement over no client side validation.



Want to know the number one trick to meeting men online and getting dates? I was online for several years before I figured it out and met my husband on … continue reading »


Read more

I felt like he had infinite patience, which always led me to realize how ridiculous I was being.” She found that oldest and only children were constantly dismissive of her pleas for attention, which only angered her more and made for combative relationships.… continue reading »


Read more

This may be due to the pressure of the relationship taking another course or the issue whether the couple really has romantic feelings for each other.… continue reading »


Read more