SfValidator özel bir hata mesajı nasıl eklenir, şeklidir
$this->setWidgets(array(
'name' =>new sfWidgetFormInput(),
'country' =>new sfWidgetFormChoice(array('choices' => CountriesPeer::getAllCountries())),
));
doğrulayıcıları
$this->setValidators(array(
'name' =>new sfValidatorString(array('required'=>true)),
'country' =>new sfValidatorChoice(array('choices' => array_keys(CountriesPeer::getAllCountries()))),
));
instead of required, or invalid message i want a custom message(like 'name is required' 'please select a country'). I know that we can set custom error message while rendering the form, but can we set it in form validators??