Hi Lester,
On Fri, Aug 12, 2016 at 8:06 PM, Lester Caine <[email protected]> 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
[email protected]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php