Annotation Interface Valid


@Retention(CLASS) @Target({TYPE,TYPE_USE,FIELD}) public @interface Valid
Marks a type for validation adapter generation

Additionally Marks a property, method parameter or method return type for validation cascading.

Constraints defined on the object and its properties are validated when the property, method parameter or method return type is validated.

This behavior is applied recursively.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Validation groups to use
  • Element Details

    • groups

      Class<?>[] groups
      Validation groups to use
      Default:
      {}