Annotation Interface Validated


@Target({PARAMETER,FIELD}) @Retention(RUNTIME) public @interface Validated
Annotation to indicate that a parameter or field should be validated. This can be used in the context of MVC lutece frameworks to apply validation rules to method parameters or class fields.

The annotation can specify validation groups, allowing different validation rules to be applied based on the context in which the parameter or field is used.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    Specifies the validation groups that this parameter or field belongs to.
  • Element Details

    • value

      Class<?>[] value
      Specifies the validation groups that this parameter or field belongs to. This can be used to apply different validation rules based on the context.
      Returns:
      An array of classes representing the validation groups
      Default:
      {}