public final class BeanValidationUtil extends Object
validate(Object)
Modifier and Type | Method and Description |
---|---|
static javax.validation.Validator |
getValidator()
Use this in case you need more than a global validation
|
static <T> Set<javax.validation.ConstraintViolation<T>> |
validate(T bean)
Validates a bean.
|
static <T> List<ValidationError> |
validate(T bean,
Locale locale,
String strFieldKeysPrefix)
Validate a bean
|
static <T> List<ValidationError> |
validate(T bean,
Locale locale,
ValidationErrorConfig config)
Validate a bean
|
public static <T> Set<javax.validation.ConstraintViolation<T>> validate(T bean)
T
- the bean typebean
- the bean to validatepublic static javax.validation.Validator getValidator()
public static <T> List<ValidationError> validate(T bean, Locale locale, String strFieldKeysPrefix)
T
- The bean classbean
- The beanlocale
- The localestrFieldKeysPrefix
- The fields keys prefix in the resource filepublic static <T> List<ValidationError> validate(T bean, Locale locale, ValidationErrorConfig config)
T
- The bean classbean
- The beanlocale
- The localeconfig
- The config for validation errors renderingCopyright © 2020 City of Paris. All rights reserved.