/** * Configures the form fields */ public function configure() { $this->widgetSchema['users_list'] = new sfWidgetFormDoctrineChoiceMany(array('model' => 'Profile', 'query' => $this->retriveAllButSuperAdmin())); $this->validatorSchema['name'] = new sfValidatorString(array('max_length' => 64, 'min_length' => 3, 'required' => true), array('max_length' => 'Project name %value% is too long (max %max_length% chars).', 'min_length' => 'Project name %value% is too short (min 3 chars).', 'required' => 'Project name is required')); $this->validatorSchema['description'] = new sfValidatorString(array('max_length' => 512, 'required' => false), array('max_length' => 'Project description is too long (max %max_length% chars).')); $this->validatorSchema['is_public'] = new sfValidatorBoolean(array('required' => false), array('invalid' => 'invalid')); $this->validatorSchema['users_list'] = new sfValidatorDoctrineChoiceMany(array('model' => 'Profile', 'alias' => '', 'required' => false, 'query' => $this->retriveAllButSuperAdmin())); parent::configure(); }