DB cleanup.

This commit is contained in:
Qiang Xue
2013-01-18 08:35:09 -05:00
parent 6dd495b65f
commit 6ed01e9645
11 changed files with 119 additions and 32 deletions

View File

@ -312,7 +312,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
* Creates validator objects based on the validation rules specified in [[rules()]].
* Unlike [[getValidators()]], each time this method is called, a new list of validators will be returned.
* @return Vector validators
* @throws BadConfigException if any validation rule configuration is invalid
* @throws InvalidConfigException if any validation rule configuration is invalid
*/
public function createValidators()
{
@ -324,7 +324,7 @@ class Model extends Component implements \IteratorAggregate, \ArrayAccess
$validator = Validator::createValidator($rule[1], $this, $rule[0], array_slice($rule, 2));
$validators->add($validator);
} else {
throw new BadConfigException('Invalid validation rule: a rule must specify both attribute names and validator type.');
throw new InvalidConfigException('Invalid validation rule: a rule must specify both attribute names and validator type.');
}
}
return $validators;