© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
11 replies
jwktje

Dynamic validation based on Select and FileUpload

Hey everyone. I have a form with a Select and a FileUpload for an image. The Select lets a user choose a location where the image must be shown. This dictates the resolution of the image I would want them to upload. Is there any way to create dynamic validation for this?

So the steps would be;
1. FileUpload is disabled until a location is chosen in the Select
2. When a selection is made, I get the
image_width
image_width
and
image_height
image_height
from the Location model
3. A dynamic validation rule is made to enforce that the uploaded image adheres to that resolution

I've tried combining Closure validation rules and Dependant fields, but there seems to be no way to get the current resolution of the uploaded image.
Any help would be greatly appreciated.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Dynamic Repeater based on FileUpload->multiple() files
FilamentFFilament / ❓┊help
15mo ago
Dynamic fields based on a select option
FilamentFFilament / ❓┊help
3y ago
Dynamic Fields Based on Select Option Issue
FilamentFFilament / ❓┊help
3y ago
FileUpload Validation Messages
FilamentFFilament / ❓┊help
15mo ago