@Documented @Constraint(validatedBy=PhoneNumberValueValidator.class) @Target(value={TYPE,ANNOTATION_TYPE}) @Retention(value=RUNTIME) public @interface PhoneNumberValue
null elements
are considered valid. Different formats can be turned on/off with allowDin5008,
allowE123, allowUri, allowMs and allowCommon.
By default all formats are turned on, you can turn it off with false.| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
allowCommon
allow not standardized but common format (true/false).
|
boolean |
allowDin5008
allow din 5008 format (true/false).
|
boolean |
allowE123
allow E123 format (true/false).
|
boolean |
allowLowerCaseCountryCode
are lower case country codes allowed (true/false).
|
boolean |
allowMs
allow microsoft format (true/false).
|
boolean |
allowUri
allow uri format (true/false).
|
String |
fieldCountryCode
field name of the country code field.
|
String |
fieldPhoneNumber
field name of the phone number field.
|
Class<?>[] |
groups
groups to use.
|
String |
message
localized message.
|
Class<? extends javax.validation.Payload>[] |
payload
payload whatever.
|
public abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
public abstract String fieldCountryCode
public abstract String fieldPhoneNumber
Copyright © 2015–2016. All rights reserved.