问题
I get validation error message in
$this->User->validationErrors;
But problem is when i assign like
DebugBreak(); //For debug my script
$response['type']='error';
$error = $this->User->validationErrors;
$response['message'] contains empty array. why this happen? help me.
回答1:
When I remove DebugBreak from my script then it work perfect like this
$response['type']='error';
$error = $this->User->validationErrors;
来源:https://stackoverflow.com/questions/22929323/how-i-can-display-validation-error-message-in-webservice