2016-02-12 63 views
0
<input type="text" class="form-control " name="username" placeholder="Enter ID " required > 

我必须改变验证的位置,告诉请填写详细信息到textbox.re必须更改验证消息为“输入用户名”。如何实现这些?我如何样式表单验证消息?

+0

可能的复制。设置自定义验证消息?](http://stackoverflow.com/questions/5272433/html5-form-required-attribute-set-custom-validation-message) –

+0

您是否使用了一些第三方验证脚本? –

+0

我知道了..此代码适用于自定义验证消息

回答

0

对于自定义验证消息我得到的回答[HTML5的形式要求的属性的

<input type="text" id="username" required placeholder="Enter Name" oninvalid="this.setCustomValidity('Enter User Name Here')" oninput="setCustomValidity('')" />