Return-Path: X-Original-To: apmail-pivot-user-archive@www.apache.org Delivered-To: apmail-pivot-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81A8B4AD0 for ; Wed, 15 Jun 2011 14:29:27 +0000 (UTC) Received: (qmail 77724 invoked by uid 500); 15 Jun 2011 14:29:27 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 77700 invoked by uid 500); 15 Jun 2011 14:29:27 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 77692 invoked by uid 99); 15 Jun 2011 14:29:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 14:29:27 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_FROM,RFC_ABUSE_POST,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of sandro.martini@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 14:29:22 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QWr5Z-0004kJ-In for user@pivot.apache.org; Wed, 15 Jun 2011 07:29:01 -0700 Date: Wed, 15 Jun 2011 07:29:01 -0700 (PDT) From: Sandro Martini To: user@pivot.apache.org Message-ID: <1308148141576-3067538.post@n3.nabble.com> In-Reply-To: <299F8FA4-63CE-4CE1-BB3D-949425D57768@verizon.net> References: <4DF614B7.6090204@sysedata.no> <1307979365834-3059246.post@n3.nabble.com> <1413DE77-C54C-45A0-A1F9-EC12C213BEE7@verizon.net> <1307980497099-3059318.post@n3.nabble.com> <1B0843B7-9D34-40D6-8E21-4C379373E502@verizon.net> <5E59C2B5-A120-4065-A3F0-44392AEE3490@verizon.net> <1308145525822-3067323.post@n3.nabble.com> <299F8FA4-63CE-4CE1-BB3D-949425D57768@verizon.net> Subject: Re: Form.required - does it have any functionality? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > This would only work if all form fields were guaranteed to be TextInputs, which they are not. > There is no way to generically ensure that a "required" field has a value, > because there is no API in Component such as "hasValue():boolean" (nor do > I think there should be). Ok, now I understand ... instead we could write some info inside existing tutorials on how to use Validators instead (on text inputs and dates, etc). Maybe I could add a NotEmptyValidator, trivial but could be useful. Or maybe we could implement (for the 2.1) a way to let application developers to use a Form method to call all validators of its elements and collect all results ... what do you think of this ? Of course be free to delete/rename the issue I just created if you think this feature could be useful ... > My opinion is that the "required" property should be eliminated. Ok, do you prefer to remove it, or should I do it ? Tell me. > Even if support were added to TerraFormSkin to paint a "required" state, > the flag is still likely to cause confusion, since it implies that Form > will execute some validation logic (which it doesn't). Right. > The definition of "required" is simply too application-specific. Yes, I agree, my idea was only to try to have a solution to handle only the first step in data validation, so probably it's not worth the effort. Thank you for the info, Sandro -- View this message in context: http://apache-pivot-users.399431.n3.nabble.com/Form-required-does-it-have-any-functionality-tp3057011p3067538.html Sent from the Apache Pivot - Users mailing list archive at Nabble.com.