setWidgets(array( 'id' => new sfWidgetFormInputHidden(), 'name' => new sfWidgetFormInput(), 'description' => new sfWidgetFormInput(), )); $this->setValidators(array( 'id' => new sfValidatorPropelChoice(array('model' => 'BillOperation', 'column' => 'id', 'required' => false)), 'name' => new sfValidatorString(array('max_length' => 255)), 'description' => new sfValidatorString(array('max_length' => 255)), )); $this->validatorSchema->setPostValidator( new sfValidatorPropelUnique(array('model' => 'BillOperation', 'column' => array('name'))) ); $this->widgetSchema->setNameFormat('bill_operation[%s]'); $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema); parent::setup(); } public function getModelName() { return 'BillOperation'; } }