开发者

Zend_Forms Errors Decorator - remove html tags

开发者 https://www.devze.com 2023-01-15 17:31 出处:网络
Error decorator input errors such way: <ul class=\"error\"> 开发者_JAVA技巧<li>Error message</li>

Error decorator input errors such way:

  <ul class="error">
开发者_JAVA技巧     <li>Error message</li>
 </ul>

How can i remove this tags and leave only error message text?


I think a neat solution to the problem is to create your own custom decorator, and use it instead of the "Errors" decorator.


$errors = $zendForm->getErrorMessages();

I think this should work? Not 100% sure though I don't have time to check documentation.

0

精彩评论

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

关注公众号