Uses of Interface
org.springframework.validation.Errors
Package
Description
Provides data binding and validation functionality,
for usage in business and/or UI layers.
Support classes for integrating a JSR-303 Bean Validation provider
(such as Hibernate Validator) into a Spring ApplicationContext
and in particular with Spring's data binding and validation APIs.
Abstractions and support classes for method validation, independent of the
underlying validation library.
Provides web-specific data binding functionality.
Support classes for web data binding.
Support for result handling through view resolution.
Support classes for Spring's web MVC framework.
This package contains Spring's JSP standard tag library for JSP 2.0+.
-
Uses of Errors in org.springframework.validation
Modifier and TypeInterfaceDescriptioninterface
General interface that represents binding results.Modifier and TypeClassDescriptionclass
Abstract implementation of theBindingResult
interface and its super-interfaceErrors
.class
Abstract implementation of theErrors
interface.class
Abstract base class forBindingResult
implementations that work with Spring'sPropertyAccessor
mechanism.class
Default implementation of theErrors
andBindingResult
interfaces, for the registration and evaluation of binding errors on JavaBean objects.class
Thrown when binding errors are considered fatal.class
Special implementation of the Errors and BindingResult interfaces, supporting registration and evaluation of binding errors on value objects.class
Map-based implementation of the BindingResult interface, supporting registration and evaluation of binding errors on Map attributes.Modifier and TypeMethodDescriptionvoid
AbstractBindingResult.addAllErrors
(Errors errors) void
BindException.addAllErrors
(Errors errors) void
Errors.addAllErrors
(Errors errors) Add all errors from the givenErrors
instance to thisErrors
instance.static void
ValidationUtils.invokeValidator
(Validator validator, Object target, Errors errors) static void
ValidationUtils.invokeValidator
(Validator validator, Object target, Errors errors, Object... validationHints) static void
ValidationUtils.rejectIfEmpty
(Errors errors, String field, String errorCode) Reject the given field with the given error code if the value is empty.static void
ValidationUtils.rejectIfEmpty
(Errors errors, String field, String errorCode, Object[] errorArgs) Reject the given field with the given error code and error arguments if the value is empty.static void
ValidationUtils.rejectIfEmpty
(Errors errors, String field, String errorCode, Object[] errorArgs, String defaultMessage) Reject the given field with the given error code, error arguments and default message if the value is empty.static void
ValidationUtils.rejectIfEmpty
(Errors errors, String field, String errorCode, String defaultMessage) Reject the given field with the given error code and default message if the value is empty.static void
ValidationUtils.rejectIfEmptyOrWhitespace
(Errors errors, String field, String errorCode) Reject the given field with the given error code if the value is empty or just contains whitespace.static void
ValidationUtils.rejectIfEmptyOrWhitespace
(Errors errors, String field, String errorCode, Object[] errorArgs) Reject the given field with the given error code and error arguments if the value is empty or just contains whitespace.static void
ValidationUtils.rejectIfEmptyOrWhitespace
(Errors errors, String field, String errorCode, Object[] errorArgs, String defaultMessage) Reject the given field with the given error code, error arguments and default message if the value is empty or just contains whitespace.static void
ValidationUtils.rejectIfEmptyOrWhitespace
(Errors errors, String field, String errorCode, String defaultMessage) Reject the given field with the given error code and default message if the value is empty or just contains whitespace.void
Validate the suppliedtarget
object, which must be of a type ofClass
for which theValidator.supports(Class)
method typically returnstrue
.void
Validate the suppliedtarget
object, which must be of aClass
for which theValidator.supports(Class)
method typically has (or would) returntrue
.default void
SmartValidator.validateValue
(Class<?> targetType, String fieldName, Object value, Errors errors, Object... validationHints) Validate the supplied value for the specified field on the target type, reporting the same validation errors as if the value would be bound to the field on an instance of the target class.Modifier and TypeMethodDescriptionstatic <T> Validator
Validator.forInstanceOf
(Class<T> targetClass, BiConsumer<T, Errors> delegate) Return aValidator
that checks whether the target object is an instance oftargetClass
, applying the givendelegate
to populateErrors
if it is.static <T> Validator
Validator.forType
(Class<T> targetClass, BiConsumer<T, Errors> delegate) Return aValidator
that checks whether the target object's class is identical totargetClass
, applying the givendelegate
to populateErrors
if it is. -
Uses of Errors in org.springframework.validation.beanvalidation
Modifier and TypeMethodDescriptionprotected void
SpringValidatorAdapter.processConstraintViolations
(Set<ConstraintViolation<Object>> violations, Errors errors) Process the given JSR-303 ConstraintViolations, adding corresponding errors to the provided SpringErrors
object.void
void
void
SpringValidatorAdapter.validateValue
(Class<?> targetType, String fieldName, Object value, Errors errors, Object... validationHints) -
Uses of Errors in org.springframework.validation.method
Modifier and TypeClassDescriptionclass
Extension ofParameterValidationResult
created for Object method parameters or return values with nested errors on their properties.ModifierConstructorDescriptionParameterErrors
(MethodParameter parameter, Object argument, Errors errors, Object container, Integer index, Object key) Create aParameterErrors
. -
Uses of Errors in org.springframework.web.bind
Modifier and TypeClassDescriptionclass
Errors wrapper that adds automatic HTML escaping to the wrapped instance, for convenient usage in HTML views.class
Exception to be thrown when validation on an argument annotated with@Valid
fails.ModifierConstructorDescriptionEscapedErrors
(Errors source) Create a new EscapedErrors instance for the given source instance. -
Uses of Errors in org.springframework.web.bind.support
Modifier and TypeClassDescriptionclass
ServerWebInputException
subclass that indicates a data binding or validation failure. -
Uses of Errors in org.springframework.web.reactive.result.view
Modifier and TypeMethodDescriptionBindStatus.getErrors()
Return the Errors instance (typically a BindingResult) that this bind status is currently associated with.Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.Retrieve the Errors instance for the given bind object. -
Uses of Errors in org.springframework.web.servlet.support
Modifier and TypeMethodDescriptionBindStatus.getErrors()
Return the Errors instance (typically a BindingResult) that this bind status is currently associated with.Retrieve the Errors instance for the given bind object, using the "defaultHtmlEscape" setting.Retrieve the Errors instance for the given bind object. -
Uses of Errors in org.springframework.web.servlet.tags