IsZipCodeValid - Solution Sites Routine

This function determines whether the basic format of the zip code specified by the sZipCode parameter is correct, returning True if so, and False otherwise. For additional information, see the Remarks.

Definition

Function IsZipCodeValid(
  sZipCode)

Defined in File

include\addr_lib.asp

Routines Called

None.

Called By

iValidateSubmittedAddress

iValidateSubmittedAddressForAddressBook

Remarks

The following formats are considered valid:

Format, where "d" is a digit Example
ddddd-dddd 98052-0000
ddddddddd 980520000
ddddd dddd 98052 0000
ddddd- 98052-
ddddd 98052

You may add further validation logic to this function to ensure zip code entered is in existence or that it matches the state/province entered by the user.

Copyright © 2005 Microsoft Corporation.
All rights reserved.