Validators and disabled components

Just a suggestion, when an expression is used to dynamically disable or hide an edit component on a template form, generally any attached validators should also be disabled so they don't pop on submit.

Can the attached validators be disabled so they don't fire if the source component is disabled or hidden? This would be a great help! I already do this using some extra code, but would be really handy if you guys could add a new checkbox to a validator that says "Disable on parent invalidation" or something...and turn off the validator when the parent is disabled or hidden.

Thank you!!

Hi @terryfryar,

You can use Visible property of the validator in such cases:

As I had mentioned, I'm already using code to accomplish this, actually using the Visible property of the validator. But that is less code required if the validator follows the visible/disabled property of it's parent. Just a suggestion, nothing more!

Unfortunately this isn't easy to implement. One can hide a component via other means e.g. using @if(condition). The Visible property setting is the only thing we can suggest.

Oh well, I just assumed since the validator has a "component" property, you could hook the visible/disabled event/property of that parent object and reflect it against the validator itself. No big deal, I already have code to handle this. Just thought it would be a product improvement, and less code to write if it was possible!

Thanks for all the hard work, Radzen crew....you have an amazing product!