Page 1 of 1

allow characters in an email validator

Posted: Sun Mar 30, 2003 5:13 pm
by glennn
have a simple mail form that validates the address - i need this validator to allow periods and dashes, but i can't figure it out. please help from someone?


if (!ereg('^[-!#$%&''*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&''*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&''*+\\./0-9=?A-Z^_`a-z{|}~]+$', $recemailto[$i]) || ereg("'", $recemailto[$i])) {
$recemailerror = "1";
$send = "no";
}

Posted: Sun Mar 30, 2003 5:21 pm
by volka