ZF-6186: Zend_Validate possibility to tuncate long values for validate messages
Description
It will be nice to truncate very long vaues passed to validator when creating error messages. For example our application permits string input up to 255 characters in length. When validation fails error message always includes full value. It will be useful to provide optional truncate for error messages for very long strings. Let's say if a string is longer then 100 chars, truncate it to 100 chars and place '...' at the end. This will avoid very long messages in UI regarding validation failures. The reason is there is no point most of the time show the full value in case of error. Just need to let them to know what we are talking about and truncate long strings.
Comments
Posted by Thomas Weidner (thomas) on 2009-04-02T13:44:31.000+0000
You could attach a filter which does this for you.
Posted by Ivan Yarych (iyarych) on 2009-04-03T00:21:23.000+0000
But this will affect Zend_Form::getValues().
Posted by Thomas Weidner (thomas) on 2009-06-13T13:50:46.000+0000
New feature added with r16052 to incubator. Waiting for acceptance from the dev-team since 13.06.2009.
Posted by Thomas Weidner (thomas) on 2009-06-19T14:29:10.000+0000
New feature cored with r16172