spring-framework / org.springframework.validation / DefaultBindingErrorProcessor

DefaultBindingErrorProcessor

open class DefaultBindingErrorProcessor : BindingErrorProcessor

Default BindingErrorProcessor implementation.

Uses the "required" error code and the field name to resolve message codes for a missing field error.

Creates a FieldError for each PropertyAccessException given, using the PropertyAccessException's error code ("typeMismatch", "methodInvocation") for resolving message codes.

Author
Alef Arendsen

Author
Juergen Hoeller

Since
1.2

See Also
#MISSING_FIELD_ERROR_CODEDataBinder#setBindingErrorProcessorBeanPropertyBindingResult#addErrorBeanPropertyBindingResult#resolveMessageCodesorg.springframework.beans.PropertyAccessException#getErrorCodeorg.springframework.beans.TypeMismatchException#ERROR_CODEorg.springframework.beans.MethodInvocationException#ERROR_CODE

Constructors

<init>

DefaultBindingErrorProcessor()

Default BindingErrorProcessor implementation.

Uses the "required" error code and the field name to resolve message codes for a missing field error.

Creates a FieldError for each PropertyAccessException given, using the PropertyAccessException's error code ("typeMismatch", "methodInvocation") for resolving message codes.

Properties

MISSING_FIELD_ERROR_CODE

static val MISSING_FIELD_ERROR_CODE: String

Error code that a missing field error (i.e. a required field not found in the list of property values) will be registered with: "required".

Functions

processMissingFieldError

open fun processMissingFieldError(missingField: String, bindingResult: BindingResult): Unit

processPropertyAccessException

open fun processPropertyAccessException(ex: PropertyAccessException, bindingResult: BindingResult): Unit