org.springframework.validation

Interface MessageCodesResolver

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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.
    • Method Detail

      • resolveMessageCodes

        java.lang.String[] resolveMessageCodes(java.lang.String errorCode,
                                               java.lang.String objectName)
        Build message codes for the given error code and object name. Used for building the codes list of an ObjectError.
        Parameters:
        errorCode - the error code used for rejecting the object
        objectName - the name of the object
        Returns:
        the message codes to use
      • resolveMessageCodes

        java.lang.String[] resolveMessageCodes(java.lang.String errorCode,
                                               java.lang.String objectName,
                                               java.lang.String field,
                                               @Nullable
                                               java.lang.Class<?> fieldType)
        Build message codes for the given error code and field specification. Used for building the codes list of an FieldError.
        Parameters:
        errorCode - the error code used for rejecting the value
        objectName - the name of the object
        field - the field name
        fieldType - the field type (may be null if not determinable)
        Returns:
        the message codes to use