public function validateAttribute($model, $attribute)
    {
        $this->_model = $model;
        $this->_attributeName = $attribute;
        $result = $this->validateValue($model->$attribute);
        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);
        }
    }
public function validateAttribute($model, $attribute)
    {
        $this->_model = $model;
        $this->_attributeName = $attribute;
        $result = $this->validateValue($model->$attribute);
        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);
        }
    }
public function validateAttribute ( $ model , $ attribute ) { $ this -> _model = $ model ; $ this -> _attributeName = $ attribute ; $ result = $ this -> validateValue ( $ model -> $ attribute ) ; if ( ! empty ( $ result ) ) { $ this -> addError ( $ model , $ attribute , $ result [ 0 ] , $ result [ 1 ] ) ; } }
Validates a single model attribute.
Child classes must implement this method to provide the actual validation logic.
@param \yii\base\Model $model the data model to be validated
@param string $attribute the name of the attribute to be validated.
Validates a single model attribute . Child classes must implement this method to provide the actual validation logic .