Validation of static methods is deliberately not supported as of Hibernate Validator 4.2 in order to be consistent with the BV 1.0 spec which says in section 3.1:
Static fields and static methods are excluded from validation.
That said, it might make sense to allow this in the future. Method validation will be standardized in Bean Validation 1.1, and the current spec draft also mandates validated methods to be non-static. Could you send a mail on that topic to the BV development mailing list to discuss that topic?
Hi Dale,
Validation of static methods is deliberately not supported as of Hibernate Validator 4.2 in order to be consistent with the BV 1.0 spec which says in section 3.1:
That said, it might make sense to allow this in the future. Method validation will be standardized in Bean Validation 1.1, and the current spec draft also mandates validated methods to be non-static. Could you send a mail on that topic to the BV development mailing list to discuss that topic?
--Gunnar