Field required but only if condition is true

Hello,

I’m experiencing an issue since I’m working with Cockpit : if a field is set to required and has a condition, if the condition is not set, the field will prevent the form submission.

Example : I have an asset field “banner_asset” which has a condition : data.banner_has_asset == true

If “banner_asset” is false, the field won’t be shown (logic) but, I won’t be able to submit my new collection entry, because “Field “banner_asset” required”.

How to make my “banner_asset” field required ONLY if its condition is set ?