diff --git a/framework/validators/ExistValidator.php b/framework/validators/ExistValidator.php index caefc49344..fb5cc7fe8a 100644 --- a/framework/validators/ExistValidator.php +++ b/framework/validators/ExistValidator.php @@ -107,10 +107,10 @@ class ExistValidator extends Validator return [$this->message, []]; } if ($this->targetClass === null) { - throw new InvalidConfigException('The "className" property must be set.'); + throw new InvalidConfigException('The "targetClass" property must be set.'); } if (!is_string($this->targetAttribute)) { - throw new InvalidConfigException('The "attributeName" property must be configured as a string.'); + throw new InvalidConfigException('The "targetAttribute" property must be configured as a string.'); } /** @var \yii\db\ActiveRecordInterface $targetClass */