[interchange] Tolerate trailing space in US zip code in multizip profile check

Jon Jensen interchange-cvs at icdevgroup.org
Tue Aug 10 23:16:37 UTC 2010


commit 7833d6ff62f853c8b82eebde3e68a13247fa67b2
Author: Jon Jensen <jon at endpoint.com>
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 {



More information about the interchange-cvs mailing list