Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to validate html forms?

0
Posted

How to validate html forms?

0

Username and password have to be validated server side, because otherwise they can just look at your code and see what the correct values should be. Generally speaking, though, you can prevent forms from being submitted with Javascript, or at least mark them as invalid, as the user above has said. However, this should not be relied upon, as one does not need to use your web page to submit the values required, and even if one does, they can simply edit the page source to bypass the validations. (Consider firebug, for example) Basically, in-page validation (usually called live validation) is for the user’s benefit, but not to be relied upon for security. For security, all validations should be implemented on the server upon receiving the form data. Your particular example of username and password is called authentication, I would expect that most web frameworks should provide you with libraries for authenticating users. In rails (the web framework I code in) there are two commonly used l

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123