On Jan 29, 2008 4:21 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote:
> -- Teemu Välimäki <[EMAIL PROTECTED]> 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? > I think I understand because I've wanted exactly the same :) By default, HeadTitle() produces <title>Title goes here</title> with no obvious way to ignore the <title> tag. Which means it could be only used with <head>, while I would like to also use in the content area inside an <h1>, which is pretty common I believe. Cheers, - Amr > > 2. Zend_Form creates labels with stripped output. It would be really > > good to have option to turn off stripping per element. I'd want to > > have a label, that has a link in it. > > 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. > > > 3. Zend_Form brings great validation procedures, but when text element > is > > required and user submits it as empty it would be then nice to get error > > like "Username cannot be empty" or "Username must be defined" instead of > "is > > an empty string". > > All error messages in Zend_Form are provided by the individual > validators you attach to the elements, and these are part of the > Zend_Validate tree. > > You will need to create your own validator and/or change the message > strings for the NotEmpty validator if you want different error messages. > > > 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. > > -- > Matthew Weier O'Phinney > PHP Developer | [EMAIL PROTECTED] > Zend - The PHP Company | http://www.zend.com/ >
