Closed GoogleCodeExporter closed 8 years ago
note also that the current validation in order_address for 'city, state if
country ==
USA' fails if their USA is a different id than 1 [which it frequently is, at
least
for my setups it has been].
Original comment by rogerpack2005
on 8 Dec 2008 at 9:43
this validates [mostly] a zip, too. Could use a zip -> state double check, but
this
is an improvement
Original comment by rogerpack2005
on 16 Dec 2008 at 8:16
Here's an updated one which also takes into account that the US country might
not be
1 [sometimes it isn't for me, for some reason it's like id 41235562 some large
number].
This patch also allows for things like australia to have a 3 digit zip [which
is
apparently necessary, according to a client].
-=r
Original comment by rogerpack2005
on 24 Jan 2009 at 10:19
Attachments:
Applied patch - it breaks the tests. Please ensure
vendor/plugins/substruct/tests/unit/order_address_test.rb passes.
Also, please add code to express this new code works as it should. Thanks.
Original comment by subim...@gmail.com
on 25 Jan 2009 at 7:16
done
Original comment by rogerpack2005
on 12 Sep 2009 at 7:54
Updated list of postal abbreviations
US_STATES =
%\AA
AE
AK
AL
AP
AR
AS
AZ
CA
CO
CT
DC
DE
FL
FM
GA
GU
HI
IA
ID
IL
IN
KS
KY
LA
MA
MD
ME
MH
MI
MN
MO
MP
MS
MT
NC
ND
NE
NH
NJ
NM
NV
NY
OH
OK
OR
PA
PR
PW
RI
SC
SD
TN
TX
UT
VA
VI
VT
WA
WI
WV
WY\.split("\n").map{|state| state.strip}
Original comment by dlredde...@gmail.com
on 12 Dec 2009 at 2:58
Original comment by subim...@gmail.com
on 14 Sep 2010 at 6:27
Original issue reported on code.google.com by
rogerpack2005
on 17 Oct 2008 at 6:29