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(com.github.fge.jsonschema.report.ProcessingReport report,
FullData data)
Validate the instance against this format attribute
|
newMsg, supportedTypes
public static FormatAttribute getInstance()
public void validate(com.github.fge.jsonschema.report.ProcessingReport report, FullData data) throws com.github.fge.jsonschema.exceptions.ProcessingException
FormatAttribute
report
- the report to usedata
- the validation datacom.github.fge.jsonschema.exceptions.ProcessingException
- an exception occurs (normally, never for a
format attribute)Copyright © 2014. All Rights Reserved.