Chinese-specific form helpers
A select widget with list of Chinese provinces as choices.
A form field that validates as Chinese post code. Valid code is XXXXXX where X is digit.
A form field that validates as Chinese Identification Card Number.
The checksum algorithm is described in GB11643-1999.
This function would grab the birthdate from the ID card number and test whether it is a valid date.
A form field that validates as Chinese phone number
A valid phone number could be like: 010-55555555
Considering there might be extension phone numbers, so this could also be: 010-55555555-35
A form field that validates as Chinese cell number
A valid cell number could be like: 13012345678
We used a rough rule here, the first digit should be 1, the second could be 3, 5 and 8, the rest could be what so ever. The length of the cell number should be 11.
An alphabetical list of provinces for use as choices in a formfield. http://en.wikipedia.org/wiki/ISO_3166-2:CN http://en.wikipedia.org/wiki/Province_%28China%29 http://en.wikipedia.org/wiki/Direct-controlled_municipality http://en.wikipedia.org/wiki/Autonomous_regions_of_China