framework/validators/UniqueValidator.php
public function init()
    {
        parent::init();
        if ($this->message !== null) {
            return;
        }
        if (is_array($this->targetAttribute) && count($this->targetAttribute) > 1) {
            // fallback for deprecated `comboNotUnique` property - use it as message if is set
            if ($this->comboNotUnique === null) {
                $this->message = Yii::t('yii', 'The combination {values} of {attributes} has already been taken.');
            } else {
                $this->message = $this->comboNotUnique;
            }
        } else {
            $this->message = Yii::t('yii', '{attribute} "{value}" has already been taken.');
        }
    }
public function init()
    {
        parent::init();
        if ($this->message !== null) {
            return;
        }
        if (is_array($this->targetAttribute) && count($this->targetAttribute) > 1) {
            // fallback for deprecated `comboNotUnique` property - use it as message if is set
            if ($this->comboNotUnique === null) {
                $this->message = Yii::t('yii', 'The combination {values} of {attributes} has already been taken.');
            } else {
                $this->message = $this->comboNotUnique;
            }
        } else {
            $this->message = Yii::t('yii', '{attribute} "{value}" has already been taken.');
        }
    }
public function init ( ) { parent :: init ( ) ; if ( $ this -> message !== null ) { return ; } if ( is_array ( $ this -> targetAttribute ) && count ( $ this -> targetAttribute ) > 1 ) { // fallback for deprecated `comboNotUnique` property - use it as message if is set if ( $ this -> comboNotUnique === null ) { $ this -> message = Yii :: t ( 'yii' , 'The combination {values} of {attributes} has already been taken.' ) ; } else { $ this -> message = $ this -> comboNotUnique ; } } else { $ this -> message = Yii :: t ( 'yii' , '{attribute} "{value}" has already been taken.' ) ; } }
{@inheritdoc}
{