Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6808F9B42 for ; Thu, 1 Mar 2012 06:25:58 +0000 (UTC) Received: (qmail 74616 invoked by uid 500); 1 Mar 2012 06:25:57 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 74582 invoked by uid 500); 1 Mar 2012 06:25:57 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 74545 invoked by uid 99); 1 Mar 2012 06:25:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 06:25:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of davidbuhler@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vx0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2012 06:25:49 +0000 Received: by vcbfl13 with SMTP id fl13so217359vcb.6 for ; Wed, 29 Feb 2012 22:25:28 -0800 (PST) Received-SPF: pass (google.com: domain of davidbuhler@gmail.com designates 10.52.28.200 as permitted sender) client-ip=10.52.28.200; Authentication-Results: mr.google.com; spf=pass (google.com: domain of davidbuhler@gmail.com designates 10.52.28.200 as permitted sender) smtp.mail=davidbuhler@gmail.com; dkim=pass header.i=davidbuhler@gmail.com Received: from mr.google.com ([10.52.28.200]) by 10.52.28.200 with SMTP id d8mr5412135vdh.38.1330583128679 (num_hops = 1); Wed, 29 Feb 2012 22:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=SyaYM8o1QR2ZzBWjOGphtD6djHwejA1xHON+yjorZlI=; b=M6mG5AqI0Yxo9JJNH+b40N28rNpNlaEOVlIRAbitXExpZX87J8N8hq6ddwNAYOytkm M+iclL3EKtcv70Qz1LvfeOssh+yzg9pUWjZD5soaHL5I1NzxssqyyLvlvY5Lr2hrKzzz w8sXgRYBQL/6omjwZ5E9dUNSgcYuqYNW2Au3I= MIME-Version: 1.0 Received: by 10.52.28.200 with SMTP id d8mr4592115vdh.38.1330583128179; Wed, 29 Feb 2012 22:25:28 -0800 (PST) Received: by 10.220.115.131 with HTTP; Wed, 29 Feb 2012 22:25:25 -0800 (PST) In-Reply-To: References: Date: Thu, 1 Mar 2012 01:25:25 -0500 Message-ID: Subject: Re: mx PostCode validator class From: David Francis Buhler To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=20cf3079bc9eb3043d04ba2886fe X-Virus-Checked: Checked by ClamAV on apache.org --20cf3079bc9eb3043d04ba2886fe Content-Type: text/plain; charset=ISO-8859-1 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 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 --20cf3079bc9eb3043d04ba2886fe--