How to check if client-side input validation was bypassed in PHP?

Viewed 80

is there an easy way to check if a user bypassed the client-side input validation? Thought about this as a security measure to ban everybody trying to bypass validation. However every solution i came up with during the last days (e.g. storing input-parameters in objects or as arrays) turned out really overcomplicated and confusing.

So before I go insane trying to find a clean solution I decided to ask for some help since I'm pretty new to PHP. Maybe it's pointless to do so anyways.

2 Answers

As others have said, do validation in both JS and PHP. All my forms have both. That is the only way to go.

The Security preventing csrf in php help you (relatively) be sure client you sent form is the one awsering

Then when you find some errors that shouldn't happen during server side validation you log the user ID for futher action.

Related