Annotation Interface CPF


@Pattern(regexp="([0-9]{3}[.]?[0-9]{3}[.]?[0-9]{3}-[0-9]{2})|([0-9]{11})") @Pattern(regexp="^(?:(?!000\\.?000\\.?000-?00).)*$") @Pattern(regexp="^(?:(?!111\\.?111\\.?111-?11).)*$") @Pattern(regexp="^(?:(?!222\\.?222\\.?222-?22).)*$") @Pattern(regexp="^(?:(?!333\\.?333\\.?333-?33).)*$") @Pattern(regexp="^(?:(?!444\\.?444\\.?444-?44).)*$") @Pattern(regexp="^(?:(?!555\\.?555\\.?555-?55).)*$") @Pattern(regexp="^(?:(?!666\\.?666\\.?666-?66).)*$") @Pattern(regexp="^(?:(?!777\\.?777\\.?777-?77).)*$") @Pattern(regexp="^(?:(?!888\\.?888\\.?888-?88).)*$") @Pattern(regexp="^(?:(?!999\\.?999\\.?999-?99).)*$") @ReportAsSingleViolation @Documented @Constraint(validatedBy={}) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) public @interface CPF
Validates a CPF (Cadastro de Pessoa FĂ­sica - Brazilian individual taxpayer registry number).
Author:
George Gastaldi, Victor Rezende dos Santos
  • Nested Class Summary

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

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<?>[]
     
     
    Class<? extends Payload>[]
     
  • Element Details

    • message

      String message
      Default:
      "{org.hibernate.validator.constraints.br.CPF.message}"
    • groups

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

      Class<? extends Payload>[] payload
      Default:
      {}