Re: [RFC][VOTE] Add validation functions to filter module

From: Date: Thu, 08 Sep 2016 10:49:54 +0000
Subject: Re: [RFC][VOTE] Add validation functions to filter module
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.internals 
Request: Send a blank email to internals+get-95785@lists.php.net to get a copy of this message
Hi Stephen, On Thu, Sep 8, 2016 at 7:34 PM, Stephen Reay <php-lists@koalephant.com> 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

« previous php.internals (#95785) next »