NAME
Business::CN::IdentityCard - Validate the Identity Card no. in China
SYNOPSIS
use Business::CN::IdentityCard;
my $id = '11010519491231002X'; # a unsure identity card no.
if (validate_id($id)) { # call the validate_id method
print 'Pass';
} else {
print 'failed, maybe faked.';
}
DESCRIPTION
There is a Chinese document @ http://www.1313s.com/f/IDCardValidate.html. It explain the algorithm of how-to validate the Identity Card no.
RESTRICTIONS
*Only* 18-length id card no. is available. The old 15-length no. is under construction.
RETURN VALUE
if it's right, return 1. otherwise, return 0.
HISTORY
Thanks for Adam Kennedy's advice. I change the module name from 'China::IdentityCard::Validate'.
BUGS
feel free to report any bugs or corrections.
AUTHOR
Fayland <fayland@gmail.com>
COPYRIGHT
Copyright (c) 2005 Fayland All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html