angel777 Posted March 30, 2008 Share Posted March 30, 2008 hi.. if i do it in php code.. the meail validation is so short <?php $email = "someone@example.com"; if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { echo "Valid email address."; } else { echo "Invalid email address."; } ?> but i find it hard to get the javascript validation as simple as those above.. Quote Link to comment Share on other sites More sharing options...
Acs Posted March 30, 2008 Share Posted March 30, 2008 Javascript also supports regex. Check this -> http://www.javascriptkit.com/javatutors/redev3.shtml Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.