Example usage for Java org.springframework.validation Errors fields, constructors, methods, implement or subclass
The text is from its open source code.
String | NESTED_PATH_SEPARATOR The separator between path elements in a nested path, for example in "customer.name" or "customer.address.street". |
void | addAllErrors(Errors errors) Add all errors from the given Errors instance to this Errors instance. |
List | getAllErrors() Get all errors, both global and field ones. |
int | getErrorCount() Return the total number of errors. |
FieldError | getFieldError(String field) Get the first error associated with the given field, if any. |
FieldError | getFieldError() Get the first error associated with a field, if any. |
int | getFieldErrorCount(String field) Return the number of errors associated with the given field. |
int | getFieldErrorCount() Return the number of errors associated with a field. |
List | getFieldErrors() Get all errors associated with a field. |
List | getFieldErrors(String field) Get all errors associated with the given field. |
Object | getFieldValue(String field) Return the current value of the given field, either the current bean property value or a rejected update from the last binding. |
int | getGlobalErrorCount() Return the number of global errors. |
List | getGlobalErrors() Get all global errors. |
String | getNestedPath() Return the current nested path of this Errors object. |
String | getObjectName() Return the name of the bound root object. |
boolean | hasErrors() Return if there were any errors. |
boolean | hasFieldErrors() Are there any field errors? |
boolean | hasFieldErrors(String field) Are there any errors associated with the given field? |
boolean | hasGlobalErrors() Are there any global errors? |
void | popNestedPath() Pop the former nested path from the nested path stack. |
void | pushNestedPath(String subPath) Push the given sub path onto the nested path stack. |
void | reject(String errorCode, String defaultMessage) Register a global error for the entire target object, using the given error description. |
void | reject(String errorCode) Register a global error for the entire target object, using the given error description. |
void | reject(String errorCode, @Nullable Object[] errorArgs, @Nullable String defaultMessage) Register a global error for the entire target object, using the given error description. |
void | rejectValue(@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. |
void | rejectValue(@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. |
void | rejectValue(@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. |
void | setNestedPath(String nestedPath) Allow context to be changed so that standard validators can validate subtrees. |
String | toString() Returns a string representation of the object. |