Re: A validator module for PHP7
| From: | Stephen Reay | Date: | Wed, 06 Sep 2017 12:05:53 +0000 |
| Subject: | Re: A validator module for PHP7 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100413@lists.php.net to get a copy of this message | ||
> On 6 Sep 2017, at 18:15, Rowan Collins <rowan.collins@gmail.com> wrote:
>
>> On 6 September 2017 09:29:37 BST, Lester Caine <lester@lsces.co.uk> wrote:
>> My only problem with Yasuo's latest offering is once again it adds a
>> whole new set of defines that have to be mapped to existing metadata
>> definitions ... That and it is a lot of longhand code using a different
>> style to existing arrays. We need yet another wrapper to build these
>> arrays from existing code ...
>
> The rules have to be defined somehow, and I'm not aware of a standard format that current
> code is likely to follow. Unless there is already such a standard, I can't see any way to avoid
> existing code having to be wrapped or amended.
>
> Which is why Yasuo and I have both suggested we work together to come up with such a standard
> format that can be used or adapted for these different parts of the application. If you have
> suggestions for how the format should look, we are eager to hear them and see some examples.
>
> Regards,
>
> --
> Rowan Collins
> [IMSoP]
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
Does this proposal actually offer any improvement over what's available with filter_var/etc and
a userland wrapper class?
If there are deficiencies in how the existing filters work, maybe work on detailing the issues and
then fixing/improving them?
That way, all the userland validation currently built around them, needs *possibly* minor changes to
make use of new flags/options, as opposed to a completely new API to use.
Cheers
Stephen