Re: [symfony-users] How to change default sfValidatorString max length message?

2011-03-06 Thread Gareth McCumskey
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);

Re: [symfony-users] How to change default sfValidatorString max length message?

2011-03-06 Thread Gábor Fási
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

[symfony-users] How to change default sfValidatorString max length message?

2011-01-19 Thread Basil Hussain
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