Thanks! This worked like magic :) Best Regards,
Thiago Campezzi [email protected] On 17 dez, 20:21, xplo <[email protected]> wrote: > Hi, > it s probably because you call setMessage after the validator has been > created, the text message is set when the validator is created and > wont be changed afterward ( it will happens will all propel/doctrine > form since the validator are created in the setup call ). > I just put the default message in ProjectConfiguration.class.php > sfValidatorBase::setDefaultMessage('required', 'This field is > required.'); > sfValidatorBase::setDefaultMessage('invalid', 'The information you > entered is invalid..'); > bye > > On Dec 17, 2:39 pm, Campezzi <[email protected]> wrote: > > > > > Hello folks, > > > I've been trying to set default error messages on my forms so that I > > don't have to "repeat myself" setting them field by field - for > > example, setting global "required" and "invalid" messages. Looking at > > the API, this seems simple enough by calling the setMessages() method > > on my form's validatorSchema, so I've tried this inside my form's > > configure() method: > > > $this->validatorSchema->setMessages(array( > > 'required' => 'This field is required.', > > 'invalid' => 'The information you entered is invalid.' > > )); > > > However, to my surprise, it does nothing! No errors/warnings/ > > exceptions, yet nothing actually happens and the same old "Required." > > and "Invalid." messages pop up on my form. > > > Is there something incredibly dumb I'm missing here or is this just a > > bug in sf 1.4? > > > Thanks for your time! > > > Best Regards, > > > Thiago Campezzi > > [email protected] -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en.
