as of 1.9.7, OpenSRS.pl's VERIFY_DATA insists on the state and zip
fields containing data suitable for, eg the US and Canada. This does
not apply to many (probably most) other countries.
If you go to <http://www.ups.com/wwtransit/engtimetran.html>, you'll
see that the pull down menu for coutries suffixes many of them with an
asterisk, indicating those which require a postal code. This may be
useful in creating a database of which countries have them. It does
not however address which coutries have states. (I should point out
that I suspect using UPS's site as the source would not qualify as
fair use; explicit permission is probably required....)
Eliminating the verification is probably not a good idea, but for the
short term it may be reasonable to check those fields only when the
country is US or CA.
Thoughts?
P.S. At the moment I'm using this simplistic patch:
======================================================================
# diff -u lib/OpenSRS.pl.~1~ lib/OpenSRS.pl
--- lib/OpenSRS.pl.~1~ Fri Jan 14 13:03:08 2000
+++ lib/OpenSRS.pl Fri Jan 21 14:10:05 2000
@@ -216,6 +216,21 @@
my $data = shift;
+# Some countries have no states or no postal codes
+ if (grep(!/$data->{owner_country}/,@main::STATE_COUNTRIES)) {
+ delete($required_fields{owner_state});
+ }
+ if (grep(!/$data->{owner_country}/,@main::ZIP_COUNTRIES)) {
+ delete($required_fields{owner_postal_code});
+ }
+ if (grep(!/$data->{billing_country}/,@main::STATE_COUNTRIES)) {
+ delete($required_fields{billing_state});
+ }
+ if (grep(!/$data->{billing_country}/,@main::ZIP_COUNTRIES)) {
+ delete($required_fields{billing_postal_code});
+ }
+
+
my %verify_data = (
is_success => undef,
error_msg => undef,
diff -u -r1.8 etc/OpenSRS.conf
--- etc/OpenSRS.conf 2000/01/20 18:27:33 1.8
+++ etc/OpenSRS.conf 2000/01/21 19:47:04
@@ -60,4 +60,13 @@
$SMTP_PORT = 25;
#################################################################
+#################################################################
+@STATE_COUNTRIES = (
+ 'CA', 'US',
+ );
+
+@ZIP_COUNTRIES = (
+ 'CA', 'US',
+ );
+
1;
======================================================================
-JimC
--
James H. Cloos, Jr. <URL:http://jhcloos.com/public_key> 1024D/ED7DAEA6
<cloos@jhcloos.com> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
Save Trees: Get E-Gold! <URL:http://jhcloos.com/go?e-gold>
This archive was generated by hypermail 2.1.3 : Tue Oct 19 2004 - 23:35:14 EDT