[OmniFaces utilities] The
getBeanValidator()
returns a Validator
instance.Method:
Usage:
Those who
are familiar with Bean Validation and implicitly with javax.validation.Validation, knows
that Validation instances
can be obtained via ValidatorFactory#getValidator().
OmniFaces provides the Platform#getBeanValidator() for this
goal, and it can be used as below:
import
org.omnifaces.util.Platform;
import
javax.validation.ValidatorFactory;
...
Validator
validator=Platform.getBeanValidator();
Niciun comentariu :
Trimiteți un comentariu