Java org.springframework.validation Errors fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.validation Errors fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.validation Errors.

The text is from its open source code.

Field

StringNESTED_PATH_SEPARATOR
The separator between path elements in a nested path, for example in "customer.name" or "customer.address.street".

Constructor

Method

voidaddAllErrors(Errors errors)
Add all errors from the given Errors instance to this Errors instance.
ListgetAllErrors()
Get all errors, both global and field ones.
intgetErrorCount()
Return the total number of errors.
FieldErrorgetFieldError(String field)
Get the first error associated with the given field, if any.
FieldErrorgetFieldError()
Get the first error associated with a field, if any.
intgetFieldErrorCount(String field)
Return the number of errors associated with the given field.
intgetFieldErrorCount()
Return the number of errors associated with a field.
ListgetFieldErrors()
Get all errors associated with a field.
ListgetFieldErrors(String field)
Get all errors associated with the given field.
ObjectgetFieldValue(String field)
Return the current value of the given field, either the current bean property value or a rejected update from the last binding.
intgetGlobalErrorCount()
Return the number of global errors.
ListgetGlobalErrors()
Get all global errors.
StringgetNestedPath()
Return the current nested path of this Errors object.
StringgetObjectName()
Return the name of the bound root object.
booleanhasErrors()
Return if there were any errors.
booleanhasFieldErrors()
Are there any field errors?
booleanhasFieldErrors(String field)
Are there any errors associated with the given field?
booleanhasGlobalErrors()
Are there any global errors?
voidpopNestedPath()
Pop the former nested path from the nested path stack.
voidpushNestedPath(String subPath)
Push the given sub path onto the nested path stack.
voidreject(String errorCode, String defaultMessage)
Register a global error for the entire target object, using the given error description.
voidreject(String errorCode)
Register a global error for the entire target object, using the given error description.
voidreject(String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage)
Register a global error for the entire target object, using the given error description.
voidrejectValue(@Nullable String field, String errorCode, String defaultMessage)
Register a field error for the specified field of the current object (respecting the current nested path, if any), using the given error description.
voidrejectValue(@Nullable String field, String errorCode)
Register a field error for the specified field of the current object (respecting the current nested path, if any), using the given error description.
voidrejectValue(@Nullable String field, String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage)
Register a field error for the specified field of the current object (respecting the current nested path, if any), using the given error description.
voidsetNestedPath(String nestedPath)
Allow context to be changed so that standard validators can validate subtrees.
StringtoString()
Returns a string representation of the object.