Created
November 26, 2010 16:39
-
-
Save andreia/716935 to your computer and use it in GitHub Desktop.
Change the default required and invalid error messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// symfony 1.2 | |
public function setup(){ | |
sfValidatorBase::setRequiredMessage('O campo é obrigatório'); | |
sfValidatorBase::setInvalidMessage('O campo é inválido'); | |
parent::setup(); | |
} | |
// symfony 1.4 | |
class frontendConfiguration extends sfApplicationConfiguration{ | |
public function configure(){ | |
sfValidatorBase::setDefaultMessage('required','O campo é obrigatório'); | |
sfValidatorBase::setDefaultMessage('invalid', 'O campo é inválido'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment