jeudi 30 juillet 2020

how to validate atleast one value of form input array in laravel request?

I am passing array input to store function .

  <div class="col-md-4 form-group-sub mt-2 date_">
   <input type="text" name="date[]" class="form-control datepicker" placeholder="Date">
  </div>
                                               

this array should be have atleast one field filled . If all the values are null i don't to submit this form how shoult i validate in request

public function rules()
    {
        return [
           
            'date.*' => '?'

        ];
    }



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire