Sometimes it is necessary to limit the maximum size a validation message can have.
For example when your view allows a maximum size of 100 chars to be rendered on one
line. To simplify the usage, Zend_Validate is able to
automatically limit the maximum returned size of a validation message.
To get the actual set size use
Zend_Validate::getMessageLength(). If it is -1, then the
returned message will not be truncated. This is default behaviour.
To limit the returned message size use
Zend_Validate::setMessageLength(). Set it to any integer size
you need. When the returned message exceeds the set size, then the message
will be truncated and the string '...' will be added instead of
the rest of the message.
<?php
Zend_Validate::setMessageLength(100);
Where is this parameter used?
The set message length is used for all validators, even for self defined ones,
as long as they extend Zend_Validate_Abstract.




