Overwrite the constructor of the sfValidatorString class to force your own
message on all sfValidatorString objects:
class mySfValidatorString extends sfValidatorString
{
public function _construct ($options, $messages)
{
$messages = array(max_length=Your message here);
Just a tip, but won't
`sfValidatorBase::setDefaultMessage(max_length, whatever)` work?
This is how I set default required and invalid messages in my project
configuration class.
On Tue, Jan 18, 2011 at 18:47, Basil Hussain
basil.huss...@experience-engine.co.uk wrote:
I have a couple of forms
I have a couple of forms with many sfValidatorString validators on
them. The default 'max_length' error message ('%value% is too long
(%max_length% characters max).') is really not suitable to the way my
forms are laid out in the HTML, because repeating the too-long value
within the message throws