public function configure()
 {
     $this->setWidgets(array('user' => new sfWidgetFormInputText(), 'repository' => new sfWidgetFormInputText()));
     $this->setValidators(array('user' => new sfValidatorString(), 'repository' => new sfValidatorString()));
     $c = new sfValidatorCallback(array('callback' => array($this, 'doValidate')));
     $c->addOption('execute-if-passed', true);
     $this->validatorSchema->setPostValidator($c);
 }
 public function configure()
 {
     $this->setWidgets(array('url' => new sfWidgetFormInput()));
     $this->setValidators(array('url' => new ForgeValidatorGitHubUrl(array(), array('required' => 'Please provide an URL', 'invalid' => 'GitHub URL could not be parsed'))));
     $c = new sfValidatorCallback(array('callback' => array($this, 'doValidate')));
     $c->addOption('execute-if-passed', true);
     $this->validatorSchema->setPostValidator($c);
 }
 public function configure()
 {
     $this->setWidgets(array('author' => new sfWidgetFormInputText(), 'arbitrarySections' => new sfWidgetFormInputText(), 'stabletag' => new sfWidgetFormInputText(), 'screenshots' => new sfWidgetFormInputText(), 'category' => new sfWidgetFormInputText(), 'tags' => new sfWidgetFormInputText(), 'title' => new sfWidgetFormInputText(), 'screenshot' => new sfWidgetFormInputText(), 'docsurl' => new sfWidgetFormInputText(), 'demourl' => new sfWidgetFormInputText(), 'howtouse' => new sfWidgetFormInputText(), 'description' => new sfWidgetFormInputText()));
     $catsCriteria = new Criteria();
     $catsCriteria->add(TermPeer::CATEGORY, true);
     $this->setValidators(array('author' => sfConfig::get('sf_environment') == 'dev' ? new sfValidatorPass() : new sfValidatorPropelChoice(array('model' => 'Author', 'column' => 'username', 'required' => true), array('required' => 'The "author:" field in package.yml is required', 'invalid' => 'Please provide a valid username in the "author:" field of your package.yml')), 'arbitrarySections' => new sfValidatorPass(), 'stabletag' => new sfValidatorPass(), 'screenshots' => new sfValidatorPass(), 'gitTags' => new sfValidatorPass(), 'category' => new sfValidatorPropelChoice(array('model' => 'Term', 'criteria' => $catsCriteria, 'column' => 'title', 'required' => true), array('invalid' => '"%value%" is not a valid category. Please check your package.yml.')), 'tags' => new sfValidatorPass(), 'title' => new sfValidatorString(array('max_length' => 255, 'required' => true), array('required' => 'A plugin name is required. Check your package.yml for the \'name\' key')), 'screenshot' => new sfValidatorUrl(array('required' => false), array('invalid' => 'The <a href="%value%">screenshot</a> in README.md is not a valid URL')), 'docsurl' => new sfValidatorUrl(array('required' => false), array('invalid' => 'The "docs:" field in package.yml is not a valid URL')), 'demourl' => new sfValidatorUrl(array('required' => false), array('invalid' => 'The "demo:" field in package.yml is not a valid URL')), 'howtouse' => new sfValidatorString(array('required' => true), array('required' => 'A "How to Use" section is required in your README.md')), 'description' => new sfValidatorString(array('required' => true), array('required' => 'A description is required in your README.md'))));
     $c = new sfValidatorCallback(array('callback' => array($this, 'doValidate')));
     $c->addOption('execute-if-passed', true);
     $this->validatorSchema->setPostValidator($c);
 }