I'll give it a look when I get back from vacation.

I'm thinking (without having looked, mind you), that a Format specified by
a developer should override the  default Format (Mask?) for
a developer-specific Country-Code.

I picture the developer who implements such a validator will often tie the
country-code property into the user's chosen locale.

Likewise, most of the applications I've worked on are for a narrow range of
countries. I'd usually disable a required Postal Code field/validator until
the user has chosen a country, and then I'd bind the Postal Code
Validator's Country Code to the selected country value.

My $0.02.

On Thu, Mar 1, 2012 at 12:36 AM, Justin Mclean <jus...@classsoftware.com>wrote:

> Hi,
>
> > That's cool!
> Thanks!
>
> > For a Postal Code validator, I believe you'll need a thorough suite of
> > tests to validate (pun!) that the class works for the wide variety of
> > Postal Formats.
> There a fair representative set of tests  so far (look at
> PostCodeValidatorTests.as) but extra tests are easy to add. Give it a try
> if you want.
>
> > Is there an ISO-Standard for Postal Codes? Or perhaps an agreed upon
> > standard for Formats for each country-code?
> There an agreed format for each country obviously :-)  I think a generic
> class when the user supplies the format is more maintainable, a bit more
> flexible and requires far less code.
>
> Justin

Reply via email to