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;
Any help would be greatly appreciated.
So the steps would be;
- FileUpload is disabled until a location is chosen in the Select
- When a selection is made, I get the
image_widthandimage_heightfrom the Location model - A dynamic validation rule is made to enforce that the uploaded image adheres to that resolution
Any help would be greatly appreciated.