Annotation Interface PhoneNumber
@Documented
@Constraint(validatedBy=PhoneNumberValidator.class)
@Target({FIELD,PARAMETER})
@Retention(RUNTIME)
public @interface PhoneNumber
Annotation to validate whether a given string is a valid phone number according to the E.164 standard.
This annotation can be applied to fields and parameters to ensure they conform to the E.164 format.
The validation logic is implemented by the
PhoneNumberValidator class, which uses Google's
libphonenumber library to validate phone numbers.-
Optional Element Summary
Optional Elements