类 FieldError

    • 构造器详细资料

      • FieldError

        public FieldError​(String objectName,
                          String field,
                          String defaultMessage)
        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
      • FieldError

        public FieldError​(String objectName,
                          String field,
                          @Nullable
                          Object rejectedValue,
                          boolean bindingFailure,
                          @Nullable
                          String[] codes,
                          @Nullable
                          Object[] arguments,
                          @Nullable
                          String defaultMessage)
        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