1 year ago

Validator array data error htmlspecialchars() expects parameter 1 to be string

Posted 1 year ago by ReakyMark

this is my HTML form

        <input type="text" name="title[]" value="" class="form-control" placeholder="Enter Title">
        <input type="file" class="btn-default btn" name="gallary[]" id="galary1"/>
        <i class="btn btn-danger fa fa-times-circle remove-gallary" aria-hidden="true"></i>

this is my Validator code

        'title.*' => 'required',
        'gallary.*' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048',

if i remove validator code it upload my image and create in DB but if i set Validate like above code i got error with htmlspecialchars() expects parameter 1 to be string.

how to solve it ?

Please sign in or create an account to participate in this conversation.