Frontside form validation is for user convenience only. A user that wants to send invalid form data would use a different client like cURL or Postman. But it's easily possible to open the dev tools, set a breakpoint in the function and skip the check. I have to admit, it's a little bit more difficult with production code. Your post is really dangerous, because it implies some kind of security. It's even tagged with #security, but it doesn't provide any security.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You need first to check the value on server side. Event with your extra check inside function, I can open the devtools and remove it.
Thanks alot for the feedback!
Could you please demonstrate or provide an example of how you've managed to edit a live JS code (on a production site)?
Frontside form validation is for user convenience only. A user that wants to send invalid form data would use a different client like cURL or Postman. But it's easily possible to open the dev tools, set a breakpoint in the function and skip the check. I have to admit, it's a little bit more difficult with production code. Your post is really dangerous, because it implies some kind of security. It's even tagged with #security, but it doesn't provide any security.