Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 10921 invoked from network); 8 Sep 2016 10:50:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Sep 2016 10:50:46 -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:57552] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E5/A6-36123-48241D75 for ; Thu, 08 Sep 2016 06:50:46 -0400 Received: (qmail 32477 invoked by uid 89); 8 Sep 2016 10:50:41 -0000 Received: from unknown (HELO mail-qk0-f171.google.com) (yohgaki@ohgaki.net@209.85.220.171) by 0 with ESMTPA; 8 Sep 2016 10:50:41 -0000 Received: by mail-qk0-f171.google.com with SMTP id m184so37249537qkb.1 for ; Thu, 08 Sep 2016 03:50:41 -0700 (PDT) X-Gm-Message-State: AE9vXwPvXMYQ7CEIbVDU/XLyZd0Q63MLdli8DAFN22NH6/MkAAWiKxwDpuB9w+x9y3zTq3BWCCFahqEs8kQvYw== X-Received: by 10.55.184.198 with SMTP id i189mr54669647qkf.96.1473331835632; Thu, 08 Sep 2016 03:50:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.84.168 with HTTP; Thu, 8 Sep 2016 03:49:54 -0700 (PDT) In-Reply-To: <8E15A146-F5B6-41AA-8177-4DAA5ACB35C4@koalephant.com> References: <232F1604-2211-4351-B830-EDC958A25D6D@strojny.net> <2de35db0-9974-cc96-83dd-3d2dbd48f7f8@lsces.co.uk> <5b72e9da-068a-bc79-82c2-f36f723f42bb@gmail.com> <8E15A146-F5B6-41AA-8177-4DAA5ACB35C4@koalephant.com> Date: Thu, 8 Sep 2016 19:49:54 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Stephen Reay Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][VOTE] Add validation functions to filter module From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Stephen, On Thu, Sep 8, 2016 at 7:34 PM, Stephen Reay wrote: > Adding a bunch of new functions is IMO the wrong approach to this type of thing. > The existing filter_var/filter_input infrastructure works well, if you want to define more rules I would definitely encourage building on/improving that system not adding a bunch of extra functions. Do you really think filter module works well as optimal validator? It cannot enforce even whitelisting well... What filter module is missing as validator currently are: - Whitelisting concept (Implemented) - Multiple rules for a variable (Implemented) - String rules (Implemented) - Optional rule (To be implemented. Refactoring is needed) These are the missing features and cannot be fixed without additional functions. (W/o modifying current function behaviors) Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net