@RequestScoped @Component public class DefaultBeanValidator extends java.lang.Object implements BeanValidator
BeanValidator using Bean Validation especification (JSR303). This implementation
will be enable by vraptor when any implementation of Bean Validation is available into classpath.| Constructor and Description |
|---|
DefaultBeanValidator(Localization localization,
javax.validation.Validator validator,
javax.validation.MessageInterpolator interpolator) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Message> |
validate(java.lang.Object bean,
java.lang.Class<?>... groups)
Validate the bean and return a list of messages if has constraint violations.
|
java.util.List<Message> |
validateProperties(java.lang.Object bean,
java.lang.String... properties)
Validate the specified bean's properties and return a list of messages if has constraint violations.
|
public DefaultBeanValidator(Localization localization, javax.validation.Validator validator, javax.validation.MessageInterpolator interpolator)
public java.util.List<Message> validate(java.lang.Object bean, java.lang.Class<?>... groups)
BeanValidatorvalidate in interface BeanValidatorbean - The object to be validated.groups - The groups that must be validated.public java.util.List<Message> validateProperties(java.lang.Object bean, java.lang.String... properties)
BeanValidatorvalidateProperties in interface BeanValidatorbean - The object to be validated.properties - The properties that must be validated.Copyright © 2013 Caelum. All Rights Reserved.