Am 05.09.2017 um 13:36 schrieb Lester Caine:
On 05/09/17 12:18, Yasuo Ohgaki wrote:
I cannot guess people's thought. I appreciated feedback!

With a decent database layer a lot of the validation you are proposing
is already covered but PDO does not help in this area. Adding another
layer that does not integrate with a storage layer is just adding to the
current mess ...

sorry, but you confuse "input validation" which this topic is about with something different - input validation and reject bad requests belongs some layers on top of any storage and should be done as soon as possible

that should even happen long before you open a database connection at all because when you know the request is bad soon enough you won't talk to any database, filesystem or whatever storage layer at all


the only question as applicaton developer is how you proceed in which cases

* reject the whole request with a error-message
* reset form-fields where you don't expect an array as input
* reset from-fields with out-of-range input values

here you go:
https://en.wikipedia.org/wiki/Data_validation

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to