Package org.zkoss.bind.validator

## Class AbstractValidator

- java.lang.Object
- - org.zkoss.bind.validator.AbstractValidator

- All Implemented Interfaces:
    `Validator`
  Direct Known Subclasses:
    `BeanValidator`, `FormBeanValidator`

      public abstract class AbstractValidator
      extends java.lang.Object
      implements Validator

  A abstract validator the handling validation message
  Since:
    6.0.0
  Author:
    dennis
  See Also:
    `ValidationMessages`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `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`

    - ### Methods inherited from interface org.zkoss.bind.Validator

      `validate`

- - ### 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