Validation: .when and .tag on multiple rules, and relying on actual binding for validation


From I understand, .when(condition) (and .tag(label)) can be applied only to single rules, so if several rules need to depend on the same condition this has to be done:


Am I correct of have I missed something?

Moreover, in our application we often rely on elements being actually bound in order to determine whether their values should be validated, thus treating if.bind=“condition” on a component as an implicit .when(condition). (See also this.)
Design-wise, is this considered appropriate?



.tag(label) can be applied to as many rules as you want, I believe.

About .when(condition), i think it’s just a guard so that you can reuse rules. Will the comment Specifies a condition that must be met before attempting to validate the rule. make it easier to understand?



I seem to have explained myself quite poorly, especially in my “single rules” word choice.
I understand how .tag and .when are used and what they mean; what I am looking for (with very low priority) is a way to apply the exact same .tag / .when on several rules at a time; something like turning my code block above into:


In this pseudo-example someRule and someOtherRule would be subject to someCondition while someExtraRule would be tested regardless. It would essentially be a shortcut to mass-tag groups of rules.