Annotation Interface MultipleEmails


@Constraint(validatedBy=MultipleEmailsValidator.class) @Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface MultipleEmails
Annotation for validation of emails string. String is parsed by "," and every value is checked using Tools.isEmail method. If only one email is invalid, validation fails for whole string.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    If true, then string can be empty.
    boolean
    If true, then emails are checked against duplicity.
    boolean
    If true, then emails are checked against unsubscribed emails (Dmail).
    Class<?>[]
     
     
    Class<? extends javax.validation.Payload>[]
     
  • Element Details

    • groups

      Class<?>[] groups
      Default:
      {}
    • payload

      Class<? extends javax.validation.Payload>[] payload
      Default:
      {}
    • message

      String message
      Default:
      "Invalid text of emails"
    • checkUnsubscribed

      boolean checkUnsubscribed
      If true, then emails are checked against unsubscribed emails (Dmail). Default is false.
      Returns:
      Default:
      false
    • checkDuplicity

      boolean checkDuplicity
      If true, then emails are checked against duplicity. Default is true.
      Returns:
      Default:
      true
    • canByEmpty

      boolean canByEmpty
      If true, then string can be empty. Default is false.
      Returns:
      Default:
      false