Answer the question
In order to leave comments, you need to log in
What should be written in the response (on error) in the controller in ActiveForm?
Good day,
I developed an ActiveForm form that is called by a popup,
sends data to the controller, where they are processed and everything is done correctly.
But if the error is what to send back to me so that it just selects the desired input, as in client validation.
at the moment I send
return \yii\helpers\Json::encode($model->getErrors());
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question