public interface MessageCodesResolver
The resulting message codes correspond to the codes of a MessageSourceResolvable (as implemented by ObjectError and FieldError).
DataBinder.setMessageCodesResolver(org.springframework.validation.MessageCodesResolver)
,
ObjectError
,
FieldError
,
MessageSourceResolvable.getCodes()
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
resolveMessageCodes(java.lang.String errorCode,
java.lang.String objectName)
Build message codes for the given error code and object name.
|
java.lang.String[] |
resolveMessageCodes(java.lang.String errorCode,
java.lang.String objectName,
java.lang.String field,
java.lang.Class<?> fieldType)
Build message codes for the given error code and field specification.
|
java.lang.String[] resolveMessageCodes(java.lang.String errorCode, java.lang.String objectName)
errorCode
- the error code used for rejecting the objectobjectName
- the name of the objectjava.lang.String[] resolveMessageCodes(java.lang.String errorCode, java.lang.String objectName, java.lang.String field, @Nullable java.lang.Class<?> fieldType)
errorCode
- the error code used for rejecting the valueobjectName
- the name of the objectfield
- the field namefieldType
- the field type (may be null
if not determinable)