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:05:59 GMT
Hi,

> What are your thoughts about adding this functionality to the
> ZipCodeValidator instead of having it as a separate component?

I thought about it but think it needs to be separate:
1. The name postcode (not zip code) is used outside the US.
2. Didn't want to accidentally break any existing code that uses mx:ZipCodeValidator
3. Interfaces are different you pass , in mine you need to set the format or formats, in mx:ZipCodValidator
you set if you want to validate US or Canadian postcodes. 
4. Existing resource strings are not generic enough (used for errors)

But I'm not against trying to merge it into one class.

> Another option would be to add the US Zip validation ruleset into your
> component and leave the ZipCodeValidator alone.
It can validate US style postcodes and one of the unit test does so.

Thanks,
Justin
Mime
View raw message