Make a textfield only required when it is not hidden

Hi at all,
I want to have a textfield that is only shown when a special condition is fullfilled and that is required. However I have the problem that when the textfield is hidden that I cannot start because the textfield is still required.
How can I make the textfield only required when it is not hidden?
This is my code for now:
image

Thank you for your help :slight_smile:

I got the solution :slight_smile:
You can use:

ng-required="variable==‘example’ "

Then the required condition is only checked if the “variable==‘example’” condition is fullfilled :slight_smile:

1 Like