Annotation Interface Required


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface Required
Shortcut for an empty Validate annotation on a field. Checks during validation whether the annotated field is set, i.e. resolves to Groovy truth (or non null for Boolean fields). As with validate, it is illegal to place this annotation on a primitive boolean field.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The level of the validation problem, defaults to Validate.Level.ERROR if the requirement is violated.
    An optional message to be given for failed validations
  • Element Details

    • value

      String value
      An optional message to be given for failed validations
      Default:
      ""
    • level

      The level of the validation problem, defaults to Validate.Level.ERROR if the requirement is violated.
      Default:
      ERROR