Skip to content
Permalink
Browse files

Removing code that will not be used any longer, it was a bad idea to use

the validation set to trigger the validaiton for a field, after all.
  • Loading branch information...
lorenzo committed Nov 14, 2013
1 parent eab012c commit 82aa396eae0764756d9423518c7758fb3f199068
Showing with 0 additions and 29 deletions.
  1. +0 −29 Cake/ORM/Validation/ValidationSet.php
@@ -77,35 +77,6 @@ public function isEmptyAllowed($allowEmpty = null) {
return $this->_allowEmpty = $allowEmpty;
}
/**
* Runs all validation rules in this set and returns a list of
* validation errors
*
* @param array $data Data array to validate
* @param boolean $isUpdate Is record being updated or created
* @return array list of validation errors for this field
*/
public function validate($data, $isUpdate = false) {
foreach ($this->getRules() as $name => $rule) {
if ($rule->skip()) {
continue;
}
if ($checkEmpty) {
break;
}
$rule->process($this->field, $data, $this->_methods);
if (!$rule->isValid()) {
$errors[] = $this->_processValidationResponse($name, $rule);
if ($rule->isLast()) {
break;
}
}
}
return $errors;
}
/**
* Gets a rule for a given name if exists
*

0 comments on commit 82aa396

Please sign in to comment.
You can’t perform that action at this time.