Fix email checking (did we do this before and had to undo it for some

reason?) Anyway, fraser valley had a student try to enter
"blah@blah.com/" as their email, which the isEmailAddress happily
accepted, and then remote servers started sending back errors to the
Committee because the email address is actually invalid.
This commit is contained in:
dave 2010-02-20 00:45:59 +00:00
parent 910c9e85b0
commit 61aee7f487

View File

@ -872,7 +872,7 @@ function outputStatus($status)
//returns true if its a valid email address, false if its not
function isEmailAddress($str) {
if(eregi('[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})', $str))
if(eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $str))
return true;
else
return false;