Hong Kong (hk)

Forms

Hong Kong specific Form helpers.

class localflavor.hk.forms.HKPhoneNumberField(*args, **kwargs)[source]

A form field that validates Hong Kong phone numbers.

The input format can be either one of the followings: ‘XXXX-XXXX’, ‘852-XXXX-XXXX’, ‘(+852) XXXX-XXXX’, ‘XXXX XXXX’, or ‘XXXXXXXX’. The output format is ‘XXXX-XXXX’.

Note: The phone number shall not start with 999, 992, or 112.
And, it should start with either 2, 3, 5, 6, 8, or 9.

http://en.wikipedia.org/wiki/Telephone_numbers_in_Hong_Kong

Deprecated since version 1.4: Use the django-phonenumber-field library instead.