addRule() public method

public addRule ( string $newRule )
$newRule string
Beispiel #1
0
 /**
  * @param string $rule
  * @param array  $newFormat
  * @return $this
  * @throws \JBZoo\SimpleTypes\Exception
  */
 public function addRule($rule, array $newFormat = array())
 {
     $form = $this->_formatter;
     $rule = $this->_parser->cleanRule($rule);
     $form->addRule($rule, $newFormat);
     $this->_parser->addRule($rule);
     $this->log('New rule "' . $rule . '" added');
     return $this;
 }