public final class PhoneAttribute extends AbstractFormatAttribute
phone format attribute.
The draft says the phone MAY match E.123. Quite vague. Here we use Google's libphonenumber as it is a library specialized in phone number recognition.
It will only chek if this is a potential phone number, not whether it is
actually valid for your country! If you really want that, you will probably
want to write your own FormatAttribute.
| Modifier and Type | Method and Description |
|---|---|
static FormatAttribute |
getInstance() |
void |
validate(ProcessingReport report,
MessageBundle bundle,
FullData data)
Validate the instance against this format attribute
|
newMsg, supportedTypespublic static FormatAttribute getInstance()
public void validate(ProcessingReport report, MessageBundle bundle, FullData data) throws ProcessingException
FormatAttributereport - the report to usebundle - the message bundle to usedata - the validation dataProcessingException - an exception occurs (normally, never for a
format attribute)