changeset 125 | fb31c951d3a2 |
parent 85 | 7c68a18a27be |
child 133 | af0f6ec48de3 |
--- a/includes/clientside/static/misc.js Fri Sep 07 16:25:16 2007 -0400 +++ b/includes/clientside/static/misc.js Sat Sep 08 14:02:19 2007 -0400 @@ -584,3 +584,14 @@ } } +/** + * Validates an e-mail address. + * @param string E-mail address + * @return bool + */ + +function validateEmail(email) +{ + return ( email.match(/^(?:[\w\d]+\.?)+@((?:(?:[\w\d]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false; +} +