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

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

Introduction

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

The text is from its open source code.

Field

StringMODEL_KEY_PREFIX
Prefix for the name of the BindingResult instance in a model, followed by the object name.

Method

voidaddAllErrors(Errors errors)
Add all errors from the given Errors instance to this Errors instance.
voidaddError(ObjectError error)
Add a custom ObjectError or FieldError to the errors list.
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()
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.
ObjectErrorgetGlobalError()
Get the first global error, if any.
intgetGlobalErrorCount()
Return the number of global errors.
ListgetGlobalErrors()
Get all global errors.
MapgetModel()
Return a model Map for the obtained state, exposing a BindingResult instance as ' #MODEL_KEY_PREFIX MODEL_KEY_PREFIX + objectName' and the object itself as 'objectName'.
StringgetNestedPath()
Return the current nested path of this Errors object.
StringgetObjectName()
Return the name of the bound root object.
ObjectgetRawFieldValue(String field)
Extract the raw field value for the given field.
String[]getSuppressedFields()
Return the list of fields that were suppressed during the bind process.
ObjectgetTarget()
Return the wrapped target object, which may be a bean, an object with public fields, a Map - depending on the concrete binding strategy.
booleanhasErrors()
Return if there were any errors.
booleanhasFieldErrors(String field)
Are there any errors associated with the given field?
booleanhasFieldErrors()
Are there any field errors?
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, @Nullable Object[] errorArgs, @Nullable 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, String defaultMessage)
Register a global error for the entire target object, 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.
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, 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.
String[]resolveMessageCodes(String errorCode, String field)
Resolve the given error code into message codes for the given field.
String[]resolveMessageCodes(String errorCode)
Resolve the given error code into message codes.
voidsetNestedPath(String nestedPath)
Allow context to be changed so that standard validators can validate subtrees.
StringtoString()
Returns a string representation of the object.