Relying on HTML 'required' for simple form validation

后端 未结 4 1285
栀梦
栀梦 2021-01-25 03:00

My question is simple, I\'m writing a simple login/registration form for my website using HTML, PHP and jQuery.

Is it neccesary to write the form validation in PHP also

4条回答
  •  我在风中等你
    2021-01-25 03:31

    You should never rely on the frontend validation. Nor Javascript or HTML. Users can open your reg form, use firebug or some other tool, inspect the text box and DELETE the required attribute. Also can send to your backend POSTed variable, even without opening your frontend

提交回复
热议问题