/** * Adds a model to the validator * @param <type> $model */ public function addModel($model) { if ($model) { $this->_model = $model; $this->_rules = $model->rules(); } }