Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95092 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47280 invoked from network); 12 Aug 2016 11:14:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 11:14:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:54401] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/50-56950-D9FADA75 for ; Fri, 12 Aug 2016 07:14:39 -0400 Received: (qmail 99035 invoked by uid 89); 12 Aug 2016 11:14:34 -0000 Received: from unknown (HELO mail-qk0-f171.google.com) (yohgaki@ohgaki.net@209.85.220.171) by 0 with ESMTPA; 12 Aug 2016 11:14:34 -0000 Received: by mail-qk0-f171.google.com with SMTP id l2so21535268qkf.3 for ; Fri, 12 Aug 2016 04:14:33 -0700 (PDT) X-Gm-Message-State: AEkooutazWHu5t+5yEHNFUT5FQa/irAjp6AJkzqRkKP7Ho7HOuufOMwRtsdgfbBea7kRb8He0Y7O7oNmtr9IuQ== X-Received: by 10.55.137.70 with SMTP id l67mr16043546qkd.132.1471000468052; Fri, 12 Aug 2016 04:14:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.242 with HTTP; Fri, 12 Aug 2016 04:13:47 -0700 (PDT) In-Reply-To: <9e2c68fc-4408-a59d-9131-d869a4b88eb2@lsces.co.uk> References: <10fbcb03-5de8-4d9a-da1c-7e2bf77937cb@lsces.co.uk> <5657afc7-7569-5fc4-4a5a-27ed786c4fa5@gmail.com> <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> <8646c3ad-b929-cb0b-bad4-52a0a7160d16@gmail.com> <11ce571b-964b-5a3e-9f2f-3f69a8bc20b4@lsces.co.uk> <7d9db8d5-ae7a-4123-14f4-f76fb6d764c5@gmail.com> <1e14c4b9-65ce-4742-589f-19fe9290be0f@lsces.co.uk> <9e2c68fc-4408-a59d-9131-d869a4b88eb2@lsces.co.uk> Date: Fri, 12 Aug 2016 20:13:47 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Lester Caine Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Simple variable handling. From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Lester, On Fri, Aug 12, 2016 at 8:06 PM, Lester Caine wrote: > On 12/08/16 11:51, Yasuo Ohgaki wrote: >> What makes you feel missing some or designed badly? > > I may be missing something, but I thought the original code had rules > for each element of the array? I would certainly expect to see the > capability of setting different validating rules for each element, and > the rules you are defining are the same rules that would be needed on a > variable by variable basis? You can do $get_def_for_an_api = array( 'date' => $my_date_spec, 'bookname' => $my_bookname_spec, 'isbn' => $my_isbn_spec, ); filter_require_var_array($_GET, $get_def_for_an_api); One missing validation filter is "optional" filter. I may add this later or now before starting vote. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net