src/Form/FormRuleContextBuilder.php
public function add($view, RuleCollection $collection)
    {
        $name = FormHelper::getFormName($view);
        if (isset($this->rules[$name])) {
            $this->rules[$name]->addCollection($collection);
        } else {
            $this->rules[$name] = $collection;
        }
    }
public function add($view, RuleCollection $collection)
    {
        $name = FormHelper::getFormName($view);
        if (isset($this->rules[$name])) {
            $this->rules[$name]->addCollection($collection);
        } else {
            $this->rules[$name] = $collection;
        }
    }
public function add ( $ view , RuleCollection $ collection ) { $ name = FormHelper :: getFormName ( $ view ) ; if ( isset ( $ this -> rules [ $ name ] ) ) { $ this -> rules [ $ name ] -> addCollection ( $ collection ) ; } else { $ this -> rules [ $ name ] = $ collection ; } }
Adds a rule collection.

@param string|FormView $view The form full_name or view instance
@param RuleCollection $collection A RuleCollection instance
Adds a rule collection .