Server validation only if form element (input, select, radio etc) is visible
Hi. I applied a server side validation. My issue is that some elements of my form are only required based on previous selections. For exapmle.
Did you like our menu?
YES - NO.
If he selected NO I display a <select> whith various options why not.
If he selected YES I display another <select> with various options of why he liked it.
These <select> are only required to be filled depending on the first answer (if he liked or not our menu).
Right now SERVER SIDE VALIDATION applies to all elements (hidden or displayed). How can I make a 'conditional' SERVER SIDE VALIDATION and validate only elements of my form that are currently displayed and ommit SERVER SIDE VALIDATION for the ones that are hidden?
Thank you in advance