I was working on an html registration form, and i discovered, that if you have, the form fields, for example, the login field, email field, ecc.. and you put on the <input> </input>
the required
attribute, if for example someone right click on the screen and click analyze element (for example in firefox), he will able to change the html and obiviusoly delete, the required
attribure.
My question is: is there a method to avoid that this attribure be deleted?
Asked
Active
Viewed 66 times
1

L. YTE
- 11
- 2
-
4You can never trust anything from the client. You must validate on the server. – SLaks Aug 21 '17 at 15:14
-
Get the input value from your form and validate those values at your server side and update to clients side accordingly – Houy Narun Aug 21 '17 at 15:26
-
HTML and js validation is mearly meant to stop the user from inputting incorrect data. Basically to make normal users follow the correct procedures for data entry. Using a server sided language like PHP you'll be able to validate at your end and stop incorrect submissions from being processed. – user8478480 Aug 21 '17 at 15:29
-
See https://security.stackexchange.com/questions/88779/how-to-prevent-user-from-removing-disabled-attribute-and-manually-editing-role – trincot Aug 21 '17 at 15:36