Hi All,
We have a DCT with has multiple tabs. These tabs have some containers (around 7-8) within it. These are layout containers. Now each container has some content modules (reused DCT XMLs). (around 20). Each content module has some mandatory fields as well.
Requirement is based on some conditions, we need to hide / show the tabs. Problem is if the tab is hidden we need to make all mandatory fields in each content module as non mandatory which is very cumbersome due to the containers nesting and multiple combinations of XPATHs.

Is there a way to hide the tab w.o making the mandatory fields as non mandatory.
Any other solution on how to handle this situation efficiently (some generalized way) to make fields non madatory w.o all XPATH combinations.
Any pointers are appreciated. I have already gone through many devnet posts which talk about making visible, hidden etc but after iterating over all children which will be a lot in this case so want to avoid.