Maybe this might help: http://laravel.com/docs/4.2/validation#conditionally-adding-rules using the sometimes rule.
Oct 8, 2014
3
Level 1
Update File Uploads / Required
Hi guys,
When updating a model which has file inputs, those file inputs cannot be pre-populated (model binding / manually) with a value. Using the "required" validation rule on those inputs means the form can not be validated as they are seen as empty/invalid even though they actually have a valid value from the initial creation. I've tried adding hidden inputs below the file inputs but still no luck? I can't seem to find anything about this online so maybe I've just been really silly and overlooked something? I hope I've explained the situation well enough, it's quite difficult to put into words!
Thanks for reading and I really do appreciate any help/responses. Mike
Level 35
2 likes
Please or to participate in this conversation.