Show name of fields in message in Input Array Validation in Laravel

I have array of dropdown with the same name what i'm trying to do is to display the actual name of the field when the error is displayed but now it is displaying like

attributes.Size Attributes Fields are required

where size is the title that i'm passing dynamically

but i want actual name which i am passing as a title to an array.

Code:

$validator = Validator::make($request->all(), [
'attributes.*' => 'required',
],[
'attributes.*.required' => ':attribute Attributes Fields are required.',
]);

{!! Form::select('attributes['.$attr->title.']') !!}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/38LPe8p
via IFTTT

تعليقات

المشاركات الشائعة من هذه المدونة

I am unable to figure out how to create payment collection request, after a form has been submitted in laravel

laravel, mysql transaction not working after failed one time