Class AbstractValidator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addInvalidMessage​(ValidationContext ctx, java.lang.String message)
      add a message to validation context, when you call this method, it also set context invalid.
      protected void addInvalidMessage​(ValidationContext ctx, java.lang.String key, java.lang.String message)
      add a message to validation context, when you call this method, it also sets context invalid.
      protected void addInvalidMessage​(ValidationContext ctx, java.lang.String key, java.lang.String message, java.lang.Object value)
      add a message to validation context, when you call this method, it also sets context invalid.
      protected void addInvalidMessages​(ValidationContext ctx, java.lang.String[] messages)
      add multiple messages to validation context, when you call this method, it also sets the context invalid.
      protected void addInvalidMessages​(ValidationContext ctx, java.lang.String key, java.lang.String[] messages)
      add multiple messages to validation context, when you call this method, it also sets the context invalid.
      protected void addInvalidMessages​(ValidationContext ctx, java.lang.String key, java.lang.String[] messages, java.lang.Object value)
      add multiple messages to validation context, when you call this method, it also sets the context invalid.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractValidator

        public AbstractValidator()
    • Method Detail

      • addInvalidMessage

        protected void addInvalidMessage​(ValidationContext ctx,
                                         java.lang.String message)
        add a message to validation context, when you call this method, it also set context invalid.
        Parameters:
        ctx - the validation context
        message - the message of validation
      • addInvalidMessage

        protected void addInvalidMessage​(ValidationContext ctx,
                                         java.lang.String key,
                                         java.lang.String message)
        add a message to validation context, when you call this method, it also sets context invalid.
        Parameters:
        ctx - the validation context
        key - the custom key of message
        message - the message of validation
      • addInvalidMessage

        protected void addInvalidMessage​(ValidationContext ctx,
                                         java.lang.String key,
                                         java.lang.String message,
                                         java.lang.Object value)
        add a message to validation context, when you call this method, it also sets context invalid.
        Parameters:
        ctx - the validation context
        key - the custom key of message
        message - the message of validation
        value - the value of the rejected field
        Since:
        8.0.1
      • addInvalidMessages

        protected void addInvalidMessages​(ValidationContext ctx,
                                          java.lang.String[] messages)
        add multiple messages to validation context, when you call this method, it also sets the context invalid.
        Parameters:
        ctx - the validation context
        messages - messages of validation
      • addInvalidMessages

        protected void addInvalidMessages​(ValidationContext ctx,
                                          java.lang.String key,
                                          java.lang.String[] messages)
        add multiple messages to validation context, when you call this method, it also sets the context invalid.
        Parameters:
        ctx - the validation context
        key - the custom key of message
        messages - messages of validation
      • addInvalidMessages

        protected void addInvalidMessages​(ValidationContext ctx,
                                          java.lang.String key,
                                          java.lang.String[] messages,
                                          java.lang.Object value)
        add multiple messages to validation context, when you call this method, it also sets the context invalid.
        Parameters:
        ctx - the validation context
        key - the custom key of message
        messages - messages of validation
        value - the value of the rejected field
        Since:
        8.0.1