I use xhtml1-strict.dtd and validator.w3.org not validate Zend Forms.
Tell me how you can validate Zend's htmluse $view->doctype('XHTML1_STRICT');
, but is work only for FormText View Helper :/
example
Zend output:<input type="">
I need:开发者_StackOverflow <input type="" />
You need to set the doctype from within zf. Get the view helper and modify it, like $this->view->doctype('XHTML1_STRICT') in an controller. You should add it to your application.ini if it's a newe version of zf. Check the manual for correct syntax.
In application.ini
:
resources.view.doctype = "XHTML1_STRICT"
resources.layout[]
In your view/scripts/layout.phtml
<?php echo $this->view->doctype(); ?>
In your view/scripts/index/form.phtml
<?php echo $this->form; ?>
精彩评论