Hi @fernando
You need to change the data element to not required in the program design.
Then you will need 2 rules:
When yes is selected then make field mandatory
When no is selected then hide field
This way you make sure that information is entered in the field when needed.
Best
William