在浏览器中禁用表单验证 [英] Disable form validation in browser
问题描述
是有什么方法可以关闭Google Chrome或其他一流的浏览器中的HTML5表单验证来测试服务器端的数据验证吗?解决方案
< form method =postaction =/ foo NOVALIDATE> ...< /形式>
请参阅这个问题的更多细节。我认为 Junit 也可以帮助测试服务器端的验证。
使用参数化查询获得更多的安全。 (如果SQL查询是使用用户输入形成的)。
编辑:
您可以将其设置为关于:标记
步骤:
1.在您的Google Chrome地址栏中,输入about:flags(不含引号),然后按Enter键。 >
2.向下滚动列表直到看到选项禁用HTML5交互式表单验证。
3.单击启用链接。
检查: http://wikibin.org/articles/google-chrome-about-and- chrome-urls.html
编辑2:
刚刚知道,关于:标志是折旧使用使用铬:/ /标志。谢谢@Max。
I'm coding on a website with forms and use HTML5 validation - no rocket science so far. Everything works fine for me in Google Chrome, but I want to get sure that even a IE 6 user with no formvalidation does not insert malformed data into my MYSQL database.
Is there any way to turn off the HTML5 form validation in Google Chrome or some other state-of-the-art browser to test the serverside data validation?
To disable validation in HTML5 use
<form method="post" action="/foo" novalidate>...</form>
Refer this question for more details.I think Junit can also help to test server side validations.
Use parameterized query to gain more security. (If SQL query is formed using user input).
EDIT :
You can set it in About:flags
Steps:
1. On your Google Chrome address bar, type "about:flags" (without the quote) and press Enter.
2.Scroll down the list until you see the option "Disable HTML5 interactive form validation".
3.Click the enable link.
Check : http://wikibin.org/articles/google-chrome-about-and-chrome-urls.html
EDIT 2 :
Just came to know that About:flags is depreciated use Use chrome://flags instead. Thanks @Max.
这篇关于在浏览器中禁用表单验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!