Support the ongoing development of Laravel.io →
posted 9 years ago
Validation

Hi,

I've been reading a lot about how to remember a file upload after validation..

I tried setting the name of the file to a hidden field, the problem is that when you revalidate, the validation is still looking for a file.. But it doesn't exist anymore.. It has become a hidden field

Does anyonre have a solution for this? Thanks!

Last updated 2 years ago.
0

You could use required_without validation rule to require hidden field if image file is not uploaded, and vice versa.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

notflip notflip Joined 2 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.