On Tuesday 29 January 2008 16:21:49 Matthew Weier O'Phinney wrote: > (on Tuesday, 29 January 2008, 11:18 AM +0200): > > 1. It'd be nice to get HeadTitle without the tags. I created my own View > > Helper, that simply strips the tags, but to have one built in would be > > better. > > I'm not sure I understand what you're looking for. Could you clarify by > showing how you're using it, and what the desired output would be?
<?= $this->headTitle() ?> produces <title>Welcome</title> I'm asking for a View Helper that would produce Welcome. > This is actually a limitation of the FormLabel view helper. By default, > ZF view helpers try to sanitize data using Zend_View::escape(). If you > want to see different behaviour, please create an issue on the issue > tracker so that we may evaluate solutions. I noticed this from the formLabel source. There already exists issue of this ZF-2497 by someone else. Good. > > 4. Zend_Form validation for some reason doesn't display "is an empty > > string" to all empty elements. Only first element in display group has > > this. Those in no display group or those without one do not have this. > > Only error message, that the the string is not long enough. > > Of course it doesn't. It uses the error messages from the validators you > attach. If an element is required, it runs each validator on the chain, > and returns error messages accordingly. > > If you want to display 'is an empty string', you should add a 'NotEmpty' > validator as the first validator in the chain; if you want that to be > the only message displayed if the item is empty, make sure you set its > breakChainOnFailure flag to true. I tracked this behavior to Alnum validator. It gives '' is an empty string. Interesting, that there is required option too, which actually seems exactly the same as NotEmpty except, that it does not give any errors. Could required be linked to NotEmpty validator? -- Teemu Valimaki <[EMAIL PROTECTED]>
