Sep 3, 2013

CakePHP: email validation without using model


App::uses('Validation', 'Utility');
class YourClass extends AppController{

public function email($emailInput){
$validEmail = Validation::email($emailInput);
  if(!$validEmail) {
return "error";
}
}

}



Reference Source: http://stackoverflow.com/a/8140790/1834908

No comments:

Post a Comment

Hey, thank you for spending time leaving some thoughts, that would be really helpful as encouragement for us to write more quality articles! Thank you!