Cakephp how to get callback validation error message from model
I'm trying t开发者_运维百科o get validation error message from model and display this in json output. Is there a way we can catch this callback in variables?
you can access the validation messages in the controller:
$errors = $this->Model->validationErrors;
then you can use it for whatever you like
精彩评论