Reputation: 10412
I'm trying to get validation error message from model and display this in json output. Is there a way we can catch this callback in variables?
Upvotes: 3
Views: 10947
Reputation: 21743
you can access the validation messages in the controller:
$errors = $this->Model->validationErrors;
then you can use it for whatever you like
Upvotes: 17