[interchange] Tolerate trailing space in US zip code in multizip profile check
Jon Jensen <[email protected]>
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 7833d6ff62f853c8b82eebde3e68a13247fa67b2 Author: Jon Jensen <[email protected]> Date: Tue Aug 10 17:16:55 2010 -0600 Tolerate trailing space in US zip code in multizip profile check Patch by Josh Lavin of Perusion. lib/Vend/Order.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- diff --git a/lib/Vend/Order.pm b/lib/Vend/Order.pm index 7a99f78..c53793b 100644 --- a/lib/Vend/Order.pm +++ b/lib/Vend/Order.pm @@ -1116,7 +1116,7 @@ $state_template{CA} = <<EOF; EOF $zip_error{US} = "'%s' not a US zip code"; -$zip_routine{US} = sub { $_[0] =~ /^\s*\d\d\d\d\d(?:-?\d\d\d\d)?$/ }; +$zip_routine{US} = sub { $_[0] =~ /^\s*\d\d\d\d\d(?:-?\d\d\d\d)?\s*$/ }; $zip_error{CA} = "'%s' not a Canadian postal code"; $zip_routine{CA} = sub {