I want to make WPF validations run only if the control that is being validated is Visible.
In my project, depending on the user's choice, some controls are Collapsed.
I have a button that is enabled only if there are no validation errors (I use WPF MultiValue Converter and check if all controls are valid - HasError is false for all controls).
Validations are implemented using ValidationRules.
So, my goal is to validate all currently Visible controls (Only Visible!), instead of Button being disabled because collapsed fields are empty...
Is there a way to make Validation Error raise only when control is Visible and input is Invalid?
I have searched on the internet for a few days, but I haven't found any solutions for this situation...
Thanks in advance! Best regards!