Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shimax's avatar

validating array of input fields not working in firefox. chrome okay

hi,

i am working in multiple file upload using $request->all(). everything working fine in local development environment for common browsers(firefox and chrome). but in production its not working in firefox browsers and it throws validation error message after i selecting a file too

local env windows 10 php 7.1

production env ubuntu 17 php 7.2

here's my code for you to check

<form method="post" action="{{ route('file.store') }}" enctype='multipart/form-data' files="true">
    <input type="file" name="file_id[]"  multiple="multiple" required/>
</form>
private $rules = ['file_id.*', => 'required'];

private $message = ['file_id.*.required' => 'file is required'];

// validate method
public function validate($data // all the requests) {
    return  Validator::make($data, $this->rules, $this->message);
}

any helps or hints. thanks

0 likes
2 replies
Talinon's avatar

looks like you're missing an equals sign after action:

<form method="post" action="{{ route('file.store') }}" enctype='multipart/form-data' files="true">

shimax's avatar

hi @Talinon i forgot put = sign while posting the question. probably that's not an issue in this case. thanks

Please or to participate in this conversation.