Exemplo n.º 1
0
 /**
  * Remove validation rule
  *
  * @param mixed $name
  *            rule name or true if all rules should be deleted for that selector
  * @param mixed $options
  *            rule options, necessary for rules that depend on params for their ID
  *
  * @throws \InvalidArgumentException
  * @internal param string $selector data selector
  * @return self
  */
 public function remove($name = true, $options = null)
 {
     if ($name === true) {
         $this->rules = new RuleCollection();
         return $this;
     }
     $validator = $this->ruleFactory->createRule($name, $options);
     $this->rules->detach($validator);
     return $this;
 }