/ Published in: PHP
only checks if the string contains @, . and alphanumeric characters
Expand |
Embed | Plain Text
// name: evValidEmail // version: v0.1 // description: chequea que sea un email valido function evValidEmail( $email ) { if ( !eregi( "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email ) ) : return true; else: return false; endif; }
Comments
Subscribe to comments
You need to login to post a comment.

There are valid top-level domains longer than 3 characters.
You are right Scooter. This is an unsafe & old function so use it carefully.
Thanks for the comment.