开发者

Cakephp how to get callback validation error message from model

开发者 https://www.devze.com 2023-04-12 23:20 出处:网络
I\'m trying t开发者_运维百科o get validation error message from model and display this in json output.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消