symfony2有效w3.org xhtml - sf2表单验证无法通过w3.org验证器

时间:2012-06-12 12:06:51

标签: forms html5 validation xhtml symfony

我遇到了有效的w3.org XHTML问题 - 验证器在输入的required属性上显示错误:

There is no attribute "required".

我相信这个属性是必不可少的,并且它由symfony2表单构建器添加以验证表单。我该怎么办?

<input type="text" id="form_dateStartEnergy" name="form_dateStartEnergy" required="required" value="2012-05-29" />

1 个答案:

答案 0 :(得分:1)

required属性定义为HTML5 specification

检查您的Doctype是否正常。

相关问题