users@javaserverfaces.java.net

Conditional validation

From: Christian Beikov <christian.beikov_at_gmail.com>
Date: Sat, 01 Sep 2012 00:48:17 +0200

I would like to propose to add a new attribute to the validator tags,
something like "condition" or we can also use the rendered attribute, I
don't really care about the name.

Anyway my point about this proposal is to create a delegating validator
that, when the "condition" attribute is declared at the validator tag,
will delegate the validation to the validator defined by the id when the
condition evaluated to true.

The approach is explained here:
https://github.com/softwaremill/softwaremill-common/tree/master/softwaremill-faces#delegating-validator

What do you think?

Regards,
Christian