What if someone changes name of HTML form inputs

117 Views Asked by At

So I'm working on a website with various post forms, and I can't wrap my head around this: What if a user were to use inspect element to change the names of the html input tags so that my server-side application can't read the incoming data. Is there any way to prevent this or should I simply check whether the fields which I named myself do in fact exist and redirect the user in case my backend detects that the input forms have been tampered with?

2

There are 2 best solutions below

0
On BEST ANSWER

No actually there is no way to avoid client to change request. and clients can create custom request for a attack to your apis. you have to validate request in server.

0
On

When someone change html code with insepct And then click the submit button All the code reset to defualt Like refresh