• You. Yes, you - stop trying to validate emails like that.
    41 replies, posted
This thread is great, I just happened to be coding a registration form right now, thanks for the tip! :D
Hmm. This thread makes me want to start using [email]n@i@k@o@m@o@nikomo.eu[/email]
[QUOTE=nikomo;26336677]Hmm. This thread makes me want to start using [email]n@i@k@o@m@o@nikomo.eu[/email][/QUOTE] n\@i\@k\@o\@m\@o@nikomo.eu You need to escape the @ characters!
Damn, iRedAdmin has invalid email validation so I can't create that address.
I don't get why can't you allow emails with stupid characters? Even if the email is wrong, who cares?
[QUOTE=johan_sm;26366801]I don't get why can't you allow emails with stupid characters? Even if the email is wrong, who cares?[/QUOTE] Because sometimes when you need an email address you intend to send something to it.
[QUOTE=Bugster;26368687]Because sometimes when you need an email address you intend to send something to it.[/QUOTE] So send a verification. All the validation in the world isn't going to help you if the user gives you an valid but nonexistent email address.
I'm waiting on [email]Morphology53@goatse.cx[/email]
[QUOTE=Siemens;26371461]So send a verification. All the validation in the world isn't going to help you if the user gives you an valid but nonexistent email address.[/QUOTE] This. Just send a validation email. If it doesn't get confirmed, discard. And if there is no validation I can just enter [email]fegterghr@sdgf.com[/email] and be done with.
This is the way I would validate emails: [php] <?php if(strpos($email, "@") === false) { echo "Invalid Email"; } else if(strpos($email, ".") === false) { echo "Invalid Email"; } else { echo "VALID"; } ?> [/php]
[QUOTE=supersnail11;26488019]This is the way I would validate emails: [php] <?php if(strpos($email, "@") === false) { echo "Invalid Email"; } else if(strpos($email, ".") === false) { echo "Invalid Email"; } else { echo "VALID"; } ?> [/php][/QUOTE] [CODE]@.[/CODE] [QUOTE]VALID[/QUOTE]
that's hardly a zing. It's a basic sanity check because we all know it's pointless to validate email addresses. Verification > validation.
Sorry, you need to Log In to post a reply to this thread.