Skip to content

Commit

Permalink
Removing the reset() methods out of the validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Nov 20, 2013
1 parent 9e84249 commit d15fcd6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
11 changes: 0 additions & 11 deletions Cake/ORM/Validation/ValidationRule.php
Expand Up @@ -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
*
Expand Down
12 changes: 0 additions & 12 deletions Cake/ORM/Validation/ValidationSet.php
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
*
Expand Down

0 comments on commit d15fcd6

Please sign in to comment.