I'm trying to validate if file of images was provide, but is an array. It can't validate and pass along without assert if is filled.
I have prepared an repository to test, you can see this in action here:
https://github.com/gravataLonga/laravel-issue-validation/blob/master/tests/Feature/MultipleImageUploadTest.php
The validation rules is set properly, i think.
If can confirm is a bug, i can fixed if you like.
Feel free to submit a PR.
I could try to resolve if i know where to start with this "workflow of PR". 馃槃 I will do my best 馃挭wish me luck. 馃崁
Hi @gravataLonga
I came across this issue the other day and I can confirm its a bug.
Are you still working on a fix?
@sdalmeida Hi, nop i'm not currently working to fix. Sorry, but i came with no time left to work on. But let me know if you need some help fixing, may be i could help you with "Pair-programming" mentality.
Hi, I have an application runig on Laravel 5.6 and one of the form elements is a multiple file input , currently I'm not using Laravel Collective for it, instead I'm using the old way: ,
$validator = Validator::make($request->all(), [
"f1" => "required|array|min:3",
"f1.*" => "required|string|distinct|min:3",
]);
Yeah, later on i realize that. Seem to me like duplicate code, it would be nice rather than make two itens on array, put only one?
Best Regards,
@GabrielaSaldana @gravataLonga is this still an issue for you in the latest version of the framework?
Closing this issue because it's inactive, already solved, old or not relevant anymore. Feel free to reply if you're still experiencing this issue and we'll re-open this issue.
Most helpful comment
Hi, I have an application runig on Laravel 5.6 and one of the form elements is a multiple file input , currently I'm not using Laravel Collective for it, instead I'm using the old way: ,
$validator = Validator::make($request->all(), [
"f1" => "required|array|min:3",
"f1.*" => "required|string|distinct|min:3",
]);