Re: Re: Adding validate_var_array()/validate_input_array() to which version?
| From: | Rowan Collins | Date: | Thu, 04 Aug 2016 11:30:14 +0000 |
| Subject: | Re: Re: Adding validate_var_array()/validate_input_array() to which version? | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94831@lists.php.net to get a copy of this message | ||
On 04/08/2016 11:45, Yasuo Ohgaki wrote:
Invalid inputs that violate input validation rules should not happen almost always because input validation is _not_ the same input mistakes by normal users. e.g. typo, user send a little too long password. These mistakes should be handled as input errors/mistakes, not input validation error.To me, "validation" absolutely means "checking if the user input the right things". What you're talking about sounds more like assertions, which would fit with the "this must be OK else die" implication of exceptions. Perhaps the functions could be called filter_assert_var_array() etc? Or perhaps some other term, to make it clear that these functions are not intended for the common task of "form validation". Regards, -- Rowan Collins [IMSoP]