开发者

valitade zend framework's output

开发者 https://www.devze.com 2022-12-28 03:06 出处:网络
I use xhtml1-strict.dtd and validator.w3.org not validate Zend Forms. Tell me how you can validate Zend\'s html

I use xhtml1-strict.dtd and validator.w3.org not validate Zend Forms.

Tell me how you can validate Zend's html

use $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; ?>

0

精彩评论

暂无评论...
验证码 换一张
取 消