Add an upload constraint based on a selection
Add an upload constraint based on a selection
Assume I have a table that has the following fields
banner_image - varchar --> this is an upload field where I have set constraints like filetypes that are allowed
link --> varchar - a link http://www.google.com for example
position - varchar - can take specific values based on a dropdown
Assume I have 3 positions top,bottom,middle
What I want to do is as follows:
Whenever I add a new record it must check the position and if the position is not middle then the upload field should only allow images that are a specific size e.g. 200x200 else any size is ok
I am not sure if it is possible but I thought there might be a way to dynamically add/remove constrains based on a selection