original_string: public function createRule($type, $message = '', $options = null)
      {
          return HTML_QuickForm2_Factory::createRule($type, $this, $message, $options);
      }
code: public function createRule($type, $message = '', $options = null)
      {
          return HTML_QuickForm2_Factory::createRule($type, $this, $message, $options);
      }
code_tokens: public function createRule ( $ type , $ message = '' , $ options = null ) { return HTML_QuickForm2_Factory :: createRule ( $ type , $ this , $ message , $ options ) ; }
docstring: Creates a validation rule
  
  This method is mostly useful when when chaining several rules together
  via {@link HTML_QuickForm2_Rule::and_()} and {@link HTML_QuickForm2_Rule::or_()}
  methods:
  <code>
  $first->addRule('nonempty', 'Fill in either first or second field')
  ->or_($second->createRule('nonempty'));
  </code>
  
  @param    string                  Rule type
  @param    string                  Message to display if validation fails
  @param    mixed                   Additional data for the rule
  @return   HTML_QuickForm2_Rule    The created rule
  @throws   HTML_QuickForm2_InvalidArgumentException If rule type is unknown
  @throws   HTML_QuickForm2_NotFoundException        If class for the rule
  can't be found and/or loaded from file
docstring_tokens: Creates a validation rule