incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Mclean <jus...@classsoftware.com>
Subject Re: mx PostCode validator class
Date Fri, 02 Mar 2012 23:11:22 GMT
Hi,

> But couldn't one component cover the logic of both the "us" way and the
> "iso" way, using some sort of locale property? 
It could but then you end up will a very last case statement.

Perhaps it better to be more flexible and:
1. Allow the format to be specified
2. Provide a method to return a suggested format for a locale
3. If the locale is not specified use the suggested format based on the current locale

Reason being you may want to validate postcodes (or any else) for multiple locales not just
the one you are currently in.

Thanks,
Justin
Mime
View raw message