forked from science-ation/science-ation
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:
parent
910c9e85b0
commit
61aee7f487
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user