Annotation Type Email


@Documented @Constraint(validatedBy=EmailValidator.class) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(RUNTIME) @Size(max=255) public @interface Email
The annotated element must be a valid eMail.
Supported types are Strings, other Objects are transfered to Strings, null elements are considered valid.
There are format tests, domain validity tests, and size checks by apache commons validation routines.
Author:
Manfred Tremmel
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several @Email annotations on the same element.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
    groups to use.
    localized messages, do not implement ourself, use the hibernate texts.
    Class<? extends jakarta.validation.Payload>[]
    payload whatever.
  • Element Details

    • message

      String message
      localized messages, do not implement ourself, use the hibernate texts.
      Returns:
      localized validation message
      Default:
      "{org.hibernate.validator.constraints.Email.message}"
    • groups

      Class<?>[] groups
      groups to use.
      Returns:
      array of validation groups
      Default:
      {}
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      payload whatever.
      Returns:
      payload class
      Default:
      {}