org.javalid.external.spring
Class SpringValidator
java.lang.Object
org.javalid.external.spring.SpringValidator
- All Implemented Interfaces:
- org.springframework.validation.Validator
public class SpringValidator
- extends java.lang.Object
- implements org.springframework.validation.Validator
SpringValidator which implements the Validator interface.
You can inject this bean directly into your MVC controllers.
Configure the validator through your spring configuration file.
Use the validatorMap to define what class is supported to be validated
and how. For complex validation and/or different type of validations for
a single class, you should just use the AnnotationValidator directly
and use SpringMessageConverter to convert the messages to Spring Errors.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- M.Reuvers
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringValidator
public SpringValidator()
supports
public boolean supports(java.lang.Class c)
- Specified by:
supports in interface org.springframework.validation.Validator
validate
public void validate(java.lang.Object object,
org.springframework.validation.Errors errors)
- Specified by:
validate in interface org.springframework.validation.Validator
setValidator
public void setValidator(AnnotationValidator validator)
getValidator
public AnnotationValidator getValidator()
setValidatorMap
public void setValidatorMap(java.util.Map<java.lang.String,ValidatorParams> validatorMap)
getValidatorMap
public java.util.Map<java.lang.String,ValidatorParams> getValidatorMap()