I'm trying to find a way to validate an email address using CakePHP 1.2 without a model. Can this be done? If so, how can I validate an email address with CakePHP 1.2 without a model?
Thanks!
I'm trying to find a way to validate an email address using CakePHP 1.2 without a model. Can this be done? If so, how can I validate an email address with CakePHP 1.2 without a model?
Thanks!
1] either use pure php regular expression match against (courtesy of http://www.regular-expressions.info/email.html)
[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
2] or call the cake email validation function from:
$Validation =& Validation::getInstance();
$result = $Validation->email($tested_email)