setWidgets(array( 'login' => new sfWidgetFormInput(), 'password' => new sfWidgetFormInputPassword(), )); $this->setValidators(array( 'login' => new sfValidatorString(array('required' => true)), 'password' => new sfValidatorString(array('required' => true)), )); $this->widgetSchema->setLabels(array( 'login' => 'Email', 'password' => 'Heslo', )); $this->widgetSchema->setNameFormat('login[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('forms'); parent::setup(); } }