org.springframework.validation
Interface Validator


public interface Validator

Interface to be implemented by objects that can validate application-specific objects. This enables validation to be decoupled from the interface and placed in business objects.

Author:
Rod Johnson

Method Summary
 boolean supports(Class clazz)
          Return whether or not this object can validate objects of the given class.
 void validate(Object obj, Errors errors)
          Validate an object, which must be of a class for which the supports() method returned true.
 

Method Detail

supports

boolean supports(Class clazz)
Return whether or not this object can validate objects of the given class.


validate

void validate(Object obj,
              Errors errors)
Validate an object, which must be of a class for which the supports() method returned true.

Parameters:
obj - Populated object to validate
errors - Errors object we're building. May contain errors for this field relating to types.


Copyright (c) 2002-2005 The Spring Framework Project.