I have form which i validate in controller when validate fails i got errors by using $myValidator->errors() which returns object of Messagebag but i want only error messages as an array of string?
1 Answer
To retrieve all errors as an array strings for all fields, you can use the all() method.
Like so:
$myValidator->errors()->all();