Skip to content

Validation of multiple file form #629

Open
@jecminek

Description

@jecminek

Subject of the issue

I have a form containing some inputs and validate them with laravel-jsvalidation. Every validations work fine except multiple file input. I set rules min and max count files. It's work when it was validate withou jsvalidation and just dump error. When I use jsvalidation this only show rules for required and array.

Part of code in my request rules:
public function rules(): array { return ['images' => ['required', 'array', 'min:1', 'max:3'], }

Part of code what was generate to footer:
rules: "images":{"laravelValidation":[["Required",[],"fotky vozidla je pot\u0159eba vyplnit",true,"images"],["Array",[],"The fotky vozidla must be an array.",false,"images"],["Min",["1"],"1 polo\u017eek je minim\u00e1ln\u00ed po\u010det pro fotky vozidla",false,"images"],["Max",["3"],"3 polo\u017eek je maxim\u00e1ln\u00ed po\u010det pro fotky vozidla",false,"images"]]}

Your environment

  • version of this package: v4.4.3
  • version of Laravel: v7.0.8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions