Annotation Type Validate

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean allowBlanks
      Indicates whether this field can be blank (i.e.
      java.lang.String matches
      Ensures that the value of this field matches a given regular expression.
      java.lang.String[] noneOf
      Ensures that the value of this field does is not an unwanted value.
      boolean nullable
      Indicates whether this field can be null
      java.lang.String[] oneOf
      Ensures that the value of this field is one of a given set of alternatives
      java.lang.Class<? extends Validator>[] validators
      User provided implementations of Validator which will be executed in sequence after the validations specified in this annotation execute.
    • Element Detail

      • nullable

        boolean nullable
        Indicates whether this field can be null
        Returns:
        true true if nulls are allowed, false otherwise
        Default:
        false
      • allowBlanks

        boolean allowBlanks
        Indicates whether this field can be blank (i.e. contain 0 or more whitespaces, where a whitespace is any character <= ' '
        Returns:
        true true if blanks are allowed, false otherwise
        Default:
        false
      • matches

        java.lang.String matches
        Ensures that the value of this field matches a given regular expression.
        Returns:
        the regular expression that determines an expected format for the given value
        Default:
        ""
      • oneOf

        java.lang.String[] oneOf
        Ensures that the value of this field is one of a given set of alternatives
        Returns:
        the sequence of allowed values
        Default:
        {}
      • noneOf

        java.lang.String[] noneOf
        Ensures that the value of this field does is not an unwanted value.
        Returns:
        the sequence of disallowed values
        Default:
        {}
      • validators

        java.lang.Class<? extends Validator>[] validators
        User provided implementations of Validator which will be executed in sequence after the validations specified in this annotation execute.
        Returns:
        custom classes to be used to validate any value associated with this field.
        Default:
        {}