public function uniqueExceptItself($attribute, $params)
    {
        $_attribute = '_' . $attribute;
        $value = $this->$attribute;
        $_value = $this->$_attribute;
        if($value <> $_value) {
            $found = false;
            if(Rubric::find()->select([$attribute])->where([$attribute => $value])->count() > 0) {
                $this->addError($attribute, Module::t('core', '{attribute} "{value}" has already been taken.', [
                    'attribute' => ucfirst($attribute), 'value' => $value,
                ]));
            }
        }
    }
public function uniqueExceptItself($attribute, $params)
    {
        $_attribute = '_' . $attribute;
        $value = $this->$attribute;
        $_value = $this->$_attribute;
        if($value <> $_value) {
            $found = false;
            if(Rubric::find()->select([$attribute])->where([$attribute => $value])->count() > 0) {
                $this->addError($attribute, Module::t('core', '{attribute} "{value}" has already been taken.', [
                    'attribute' => ucfirst($attribute), 'value' => $value,
                ]));
            }
        }
    }
public function uniqueExceptItself ( $ attribute , $ params ) { $ _attribute = '_' . $ attribute ; $ value = $ this -> $ attribute ; $ _value = $ this -> $ _attribute ; if ( $ value <> $ _value ) { $ found = false ; if ( Rubric :: find ( ) -> select ( [ $ attribute ] ) -> where ( [ $ attribute => $ value ] ) -> count ( ) > 0 ) { $ this -> addError ( $ attribute , Module :: t ( 'core' , '{attribute} "{value}" has already been taken.' , [ 'attribute' => ucfirst ( $ attribute ) , 'value' => $ value , ] ) ) ; } } }
Checks unique except of the value of the attribute.
Checks unique except of the value of the attribute .