Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100368 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25676 invoked from network); 4 Sep 2017 12:53:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2017 12:53:21 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.50 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.50 mail-wm0-f50.google.com Received: from [74.125.82.50] ([74.125.82.50:35228] helo=mail-wm0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F0/3C-04538-0CC4DA95 for ; Mon, 04 Sep 2017 08:53:21 -0400 Received: by mail-wm0-f50.google.com with SMTP id v2so4456995wmf.0 for ; Mon, 04 Sep 2017 05:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:user-agent:in-reply-to:references:mime-version :content-transfer-encoding:subject:to:from:message-id; bh=bU3fK8HiPDnItWjv1TW/0KGFViK7zgzzLu8064U5HCg=; b=KCL3Y+ZDx8Ix1ucmDvPGRCCPkMgx5gvR4l3rYlFNld4U+DYGpTopOWL1wz+YSdMvfF 5RqvDbmvmaygEJvXZdwerT553fLBaOivKQfF5pBtRT/yClPkHEU9RPeRvMrtGFsGs6Cc dn7XwE0EnnlcTN5Duou37bsXB9owdW5dBg6dx9dK2blPYbNo/nsqtO66zXAd9Jzam5B1 pxvXzaLIN6N99qRvgOj08dP097eBe1Nh+9XsMvT7DXg/IT0tOsEHNRkY8zWYUfax9Plx eWWN1fNi0Wh58yzWk2MXQ3r3qAJdBsJe5oINPHSx3s2vLcczGVf9jKMdywucrPgHi5Js /vMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:user-agent:in-reply-to:references :mime-version:content-transfer-encoding:subject:to:from:message-id; bh=bU3fK8HiPDnItWjv1TW/0KGFViK7zgzzLu8064U5HCg=; b=ksD8EJMjygUZ1/t8tqa+3rXfEydBEzSoMZl5O34DTXPYPWFpxmGVfHtmucc4Z9obV8 YKV5WewtKGJv9RDCbOLrloNggV9tx+/BM9ttzho2nT5vqy/CtseyctOD3vNRHyfBZJtE bKydFxv3l0qudQBSgqnNpWrJeNSLYCsgPTAls+00Tm5VjiABAUtHukHs5nsE+F0FUDEO O+niyKNOVn17zVoibFRVQqpGGOsJ4d3UlIjpYXx1KqKt0H51efQjnCku4XNeSicpgbZr fmbp7d/gK+GixYyliAFzsY9zKHgVyYDd2/2TvpCiGR1+r476D/akoSxcQjCIRc6f4ktN curg== X-Gm-Message-State: AHPjjUj1aI7vB05fQc+8U5esPVWBZh++Zi8b0J2JWGi8ZSuEQsSiuI5R YILZ7OABBS/9IKcFWb8= X-Google-Smtp-Source: ADKCNb66FG13lOPPTYUfhZCiKDYUmCccJ5rWwYaPWAIyDlO/2fvUuVozlrLa2oRv66IBkqphPOjscA== X-Received: by 10.28.105.156 with SMTP id z28mr218937wmh.73.1504529598065; Mon, 04 Sep 2017 05:53:18 -0700 (PDT) Received: from [10.60.21.86] (188.29.165.185.threembb.co.uk. [188.29.165.185]) by smtp.gmail.com with ESMTPSA id v5sm474565wmv.12.2017.09.04.05.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Sep 2017 05:53:17 -0700 (PDT) Date: Mon, 04 Sep 2017 13:53:14 +0100 User-Agent: K-9 Mail for Android In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable To: internals@lists.php.net,Yasuo Ohgaki ,"internals@lists.php.net" Message-ID: Subject: Re: [PHP-DEV] A validator module for PHP7 From: rowan.collins@gmail.com (Rowan Collins) On 4 September 2017 07:33:41 BST, Yasuo Ohgaki wrote= : >Hi all, > >I spent a little time for a new input validation module=2E It's not >totally >new module, but is based on Filter module's validation filter >improvement >RFC in many ways=2E [1] Hi Yasuo, Thanks for tackling this=2E I do think the current filter module is user u= nfriendly and it would be great to have something better=2E A couple of qui= ck thoughts based on your README: - The use of nested arrays keeps things simple in one sense, but the deep = nesting can get confusing=2E I wonder if a ValidationRule class would make = the distinction between parameters and references to existing rules clearer= =2E This would also give you a natural home for validating the validation r= ules themselves (probably by throwing an exception in the constructor)=2E - A minor point, but most style guides would suggest function names should= be verbs, not adjectives, so "validate()" rather than "valid()"=2E - Is there a use case for valid_id() or is it a temporary debugging thing = that won't be in the final version? In general, I like the idea, but would have to play around a bit to see if= it felt easy to use in real world situations=2E Regards, --=20 Rowan Collins [IMSoP]