It's a waste of validating a form with server side language, and it overcharges the net.
There's a function that works quite good -->
It checks for a string in a string.
Code: Select all
var my_string = "firstname.lastname@example.org";
var check_a = my_string.indexOf('@');
var check_dot = my_string.indexOf('.');
if ( (check_a == -1) || (check_dot == -1) )
alert('Your email is not valid');