Answer the question
In order to leave comments, you need to log in
How to get a key that failed validation in laravel validator?
There are rules:
$validator = Validator::make($args, [
'place.name' => 'required|min:3|max:50',
'place.type_id' => 'required|integer|exists:types,id',
'kitchens' => 'array|min:1',
]);
$validator->errors()->first();
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