-
Available since OmniFaces 3.8
Collection of utility methods for the Bean Validation API in general.
Usage
Here are some examples:
// Check if Bean Validation is available.
boolean available = Validators.isBeanValidationAvailable();
// Check if Bean Validation is available.
boolean available = Validators.isBeanValidationAvailable();
// Validate whole bean with Bean Validation.
Set<ConstraintViolation<?>> violations = Validators.validateBean(bean);
// Validate only a bean property with Bean Validation.
Set<ConstraintViolation<?>> violations = Validators.validateBeanProperty(bean, "propertyName", propertyValue);
For a full list, check the method summary.
Feature request
If you know more useful methods/functions which you think should be added to this OmniFaces utility class so that everyone can benefit from a "standard" Faces utility library, feel free to post a feature request.
Documentation & Sources