php - Laravel 5.3 pass multiple MessageBag instances to $errors variable -
i have 2 modal fields on page forms , need determine of model fields has error.
so question is:
how can pass multiple messagebag
's $errors
able check errors using $errors->errortype->get('message')
?
you can pass json message since string
{ "message1":"foo", "message2":"bar", }
then
$results = json_decode($errors->errortype->get('message'),true); print_r($results['message1']; print_r($results['message2'];
Comments
Post a Comment