org.eel.kitchen.jsonschema.format
Class PhoneNumberFormatSpecifier

java.lang.Object
  extended by org.eel.kitchen.jsonschema.format.FormatSpecifier
      extended by org.eel.kitchen.jsonschema.format.PhoneNumberFormatSpecifier

public final class PhoneNumberFormatSpecifier
extends FormatSpecifier

Attempt to validate the phone format specification

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 KeywordValidator.


Method Summary
static FormatSpecifier getInstance()
           
 
Methods inherited from class org.eel.kitchen.jsonschema.format.FormatSpecifier
validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FormatSpecifier getInstance()


Copyright © 2012. All Rights Reserved.