DESCRIPTION

Number::Phone::JP is a simple module to validate Japanese phone number formats. The Japanese phone numbers are regulated by Ministry of Internal Afairs and Communications of Japan. You can validate what a target number is valid from this regulation point of view.

There are many categories for type of telephones in Japan. This module is able to be used narrowed down to the type of phones.

This module only validates what a phone number agrees on the regulation. Therefore, it does NOT validate what a phone number actually exists.

This validation needs only an area (or category) prefix and behind it. The separator of number behind the prefix is ignored.

METHODS

new

This method constructs the Number::Phone::JP instance. you can put some argument of a phone number to it. It needs a two stuff for validation, area prefix (or carrier's prefix) and following (means local-area prefix, subscriber's number, and something).

If you put only one argument, this module will separate it by the first non-number character. And it will be ignored any non-number characters.

import

It exists to select what categories is used for validation. You should pass some specified categories to this method.