From d15fcd6b5a308e95bbcc4dab850245739bc69397 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Thu, 31 Oct 2013 20:28:56 +0100 Subject: [PATCH] Removing the reset() methods out of the validation --- Cake/ORM/Validation/ValidationRule.php | 11 ----------- Cake/ORM/Validation/ValidationSet.php | 12 ------------ 2 files changed, 23 deletions(-) diff --git a/Cake/ORM/Validation/ValidationRule.php b/Cake/ORM/Validation/ValidationRule.php index 73e4d9fada2..65fd04cca73 100644 --- a/Cake/ORM/Validation/ValidationRule.php +++ b/Cake/ORM/Validation/ValidationRule.php @@ -178,17 +178,6 @@ public function process($field, $data, $methods) { return true; } -/** - * Resets internal state for this rule, by default it will become valid - * and it will set isUpdate() to false - * - * @return void - */ - public function reset() { - $this->_valid = true; - $this->_isUpdate = false; - } - /** * Returns passed options for this rule * diff --git a/Cake/ORM/Validation/ValidationSet.php b/Cake/ORM/Validation/ValidationSet.php index e2faa8f5e74..08d73596110 100644 --- a/Cake/ORM/Validation/ValidationSet.php +++ b/Cake/ORM/Validation/ValidationSet.php @@ -114,7 +114,6 @@ public function allowEmpty($allowEmpty = null) { * @return array list of validation errors for this field */ public function validate($data, $isUpdate = false) { - $this->reset(); $this->_isUpdate = $isUpdate; if ($this->checkValidatePresent($this->field, $data)) { @@ -202,17 +201,6 @@ public function checkEmpty($field, $data) { return false; } -/** - * Resets internal state for all validation rules in this set - * - * @return void - */ - public function reset() { - foreach ($this->getRules() as $rule) { - $rule->reset(); - } - } - /** * Gets a rule for a given name if exists *