• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Andy Miller
#21 Posted : Thursday, October 9, 2008 4:34:15 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
[quote="MitchA"]

The Regex is blank. Is this the problem?

If the regular expression is blank, then the zip code will not be validated.
^\d{5}$ will force 5 digit zip code.

^\d{5}-\d{4}$ will force a 5+4 digit zip code.

^\d{5}$|^\d{5}-\d{4}$ will accept either a 5 or 5+4 zip code.

You can find more here, http://regexlib.com/Search.aspx?k=zip%20code.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
MitchA
#22 Posted : Thursday, October 9, 2008 6:20:45 PM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

Thanks Andy. That site's going in my bookmarks.

I went to regexlib and found a few for Canada. Some are incredibly tourtured and don't work very well.

So far, this one does seem to work for Canada - needs a space, and must have CAPS as it should: ^((\d{5}-\d{4})|(\d{5})|([A-Z]\d[A-Z]\s\d[A-Z]\d))$

Anyone got a better one?
Optimists invent airplanes,
Pessimists buy parachutes.
Richard
#23 Posted : Thursday, October 9, 2008 9:50:45 PM(UTC)
Richard

Rank: Member

Joined: 4/28/2003(UTC)
Posts: 141

Mitch here is one for Canada that will let you use upper or lower case and with or without a space.


^[ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]{1}\d{1}[A-Za-z]{1} *\d{1}[A-Za-z]{1}\d{1}$



Richard

www.somethingmorestore.com
MitchA
#24 Posted : Thursday, October 9, 2008 10:01:53 PM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

Rich,

I'd assume that Fed Ex and UPS require a certain format - as they do for the US Zip Codes. Remember applying a patch so Fed Ex Ship Mgr wouldn't choke on a +4 zip code?

Do you know if A1a2B2 or A1A-2b2 is the same as A1A 2B2 to Fed Ex, USPS and UPS?
Optimists invent airplanes,
Pessimists buy parachutes.
Andy Miller
#25 Posted : Friday, October 10, 2008 12:10:05 AM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Mitch,

I think FedEx ignores Canadian postal codes. Less sure about the others.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
Richard
#26 Posted : Friday, October 10, 2008 12:15:57 AM(UTC)
Richard

Rank: Member

Joined: 4/28/2003(UTC)
Posts: 141

Mitch,

I really can't speak for UPS or FedEX, but I think USPS doesn't verify anything as far as International shipments are concerned. Andy can probably shed more light on this than I can.

Richard
MitchA
#27 Posted : Friday, October 10, 2008 8:52:26 AM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

For Canada, I'm getting $0.00 for shipping with Fed Ex Ground. Any way to fix this? I'd like to add Canada.
Optimists invent airplanes,
Pessimists buy parachutes.
Andy Miller
#28 Posted : Friday, October 10, 2008 11:23:56 AM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
I was wrong about the Canada postal code. FedEx *does* require a postal code to estimate shipping. And it must be presented without a space in the middle (i.e. T6E 5V1 will fail, but T6E5V1 will work).

The space should be removed by the code. I'll post something in the SP4 rc forum.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
MitchA
#29 Posted : Friday, October 10, 2008 1:57:55 PM(UTC)
MitchA

Rank: Member

Joined: 3/3/2006(UTC)
Posts: 1,737

Fed Ex strikes again.

Thanks Andy.
Optimists invent airplanes,
Pessimists buy parachutes.
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012