| java.lang.Object | |||
| ↳ | org.springframework.context.support.DefaultMessageSourceResolvable | ||
| ↳ | org.springframework.validation.ObjectError | ||
| ↳ | org.springframework.validation.FieldError | ||
Encapsulates a field error, that is, a reason for rejecting a specific field value.
See the DefaultMessageCodesResolver javadoc for details on
how a message code list is built for a FieldError.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a new FieldError instance.
| |||||||||||
Create a new FieldError instance.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Return the affected field of the object.
| |||||||||||
Return the rejected field value.
| |||||||||||
Return whether this error represents a binding failure
(like a type mismatch); otherwise it is a validation failure.
| |||||||||||
Default implementation exposes the attributes of this MessageSourceResolvable.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.validation.ObjectError
| |||||||||||
From class
org.springframework.context.support.DefaultMessageSourceResolvable
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.context.MessageSourceResolvable
| |||||||||||
Create a new FieldError instance.
| objectName | the name of the affected object |
|---|---|
| field | the affected field of the object |
| defaultMessage | the default message to be used to resolve this message |
Create a new FieldError instance.
| objectName | the name of the affected object |
|---|---|
| field | the affected field of the object |
| rejectedValue | the rejected field value |
| bindingFailure | whether this error represents a binding failure (like a type mismatch); else, it is a validation failure |
| codes | the codes to be used to resolve this message |
| arguments | the array of arguments to be used to resolve this message |
| defaultMessage | the default message to be used to resolve this message |
Return whether this error represents a binding failure (like a type mismatch); otherwise it is a validation failure.
Default implementation exposes the attributes of this MessageSourceResolvable.
To be overridden in more specific subclasses, potentially including the
resolvable content through resolvableToString().