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 646669261 for ; Fri, 2 Mar 2012 23:14:14 +0000 (UTC) Received: (qmail 53542 invoked by uid 500); 2 Mar 2012 23:14:13 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 53516 invoked by uid 500); 2 Mar 2012 23:14:13 -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 53508 invoked by uid 99); 2 Mar 2012 23:14:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 23:14:13 +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 omarg.developer@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2012 23:14:07 +0000 Received: by wera1 with SMTP id a1so1427555wer.6 for ; Fri, 02 Mar 2012 15:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of omarg.developer@gmail.com designates 10.216.131.221 as permitted sender) client-ip=10.216.131.221; Authentication-Results: mr.google.com; spf=pass (google.com: domain of omarg.developer@gmail.com designates 10.216.131.221 as permitted sender) smtp.mail=omarg.developer@gmail.com; dkim=pass header.i=omarg.developer@gmail.com Received: from mr.google.com ([10.216.131.221]) by 10.216.131.221 with SMTP id m71mr2394499wei.0.1330730026965 (num_hops = 1); Fri, 02 Mar 2012 15:13:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=y8gDB1FUqdYFBM3XxR6i833wjlpuHOY+4iHCoe2Cfgo=; b=A4y3x2cuAAgLr62DEFLC+nowjJrbcBhhY+nllY7F1ulwpsio9uh8KEFJivoLXQ4Wae 7sYKHbRrF3Pvw6hIhANvKWzNqb6DVh33UszClJ35921z3Dy7y70IbJqHCNlJNRr8K4Fl fMZhn/M4ySidmSd60Y2dJriPaa+J29C2Dvcr1x6+EBNcGHqRau4/7ZBMjjNnkZjvAgOB Odn8EkGnxwRndDMCmSLYU+dBMu9mnXEPxqZFI+7dIkihm1Bph/iNVAKIl9CzUjCTXr7F IxmnMOrykpAH4ErZpeoNRm/wwspIgs9SqIqYZwhjxLjydcBZUM6PGxrHKYOII2mPUAyJ OnYw== MIME-Version: 1.0 Received: by 10.216.131.221 with SMTP id m71mr1927544wei.0.1330730026844; Fri, 02 Mar 2012 15:13:46 -0800 (PST) Received: by 10.180.98.194 with HTTP; Fri, 2 Mar 2012 15:13:46 -0800 (PST) In-Reply-To: <81652D40-1476-44FE-A8EA-45E846D6AB66@classsoftware.com> References: <81652D40-1476-44FE-A8EA-45E846D6AB66@classsoftware.com> Date: Fri, 2 Mar 2012 15:13:46 -0800 Message-ID: Subject: Re: mx PostCode validator class From: Omar Gonzalez To: flex-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=0016e6d7e0a08ac34104ba4aba4a X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d7e0a08ac34104ba4aba4a Content-Type: text/plain; charset=ISO-8859-1 On Fri, Mar 2, 2012 at 3:11 PM, Justin Mclean wrote: > 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 This makes perfect sense to me, and seems to fit in with the Spark validators model where they have hooks to the new globalization APIs. I need to spend some time figuring that out. -- Omar Gonzalez s9tpepper@apache.org Apache Flex PPMC Member --0016e6d7e0a08ac34104ba4aba4a--