mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
DB cleanup.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user