Hi,
validation.xml is not really an option here. The spec says:
Quote:
If more than one META-INF/validation.xml file is
found in the classpath, a ValidationException is raised.
You could programmatically create multiple
ValidatorFactorys and have multiple
Validators. I don't think I would recommend this approach though. I probably would write a custom constraint where in the
ConstraintValidator implementation I act depending on the user logged in. Or maybe you could use groups. Assign you constraints to groups (eg HS group and Director group), then when you call Validator.validate only validate the group depending on the logged in person. This is probably the best solution.
--Hardy