ZF-6186: Zend_Validate possibility to tuncate long values for validate messages

Issue Type: Improvement Created: 2009-04-02T02:57:31.000+0000 Last Updated: 2009-06-19T14:29:10.000+0000 Status: Resolved Fix version(s): - 1.9.0 (31/Jul/09)

Reporter: Ivan Yarych (iyarych) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

Related issues: Attachments:


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.


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.