common/models/forms/Register.php
public function termsValidator( $attribute, $params ) {

		if( $this->terms === 'on' ) {

			return;
		}

		if( !isset( $this->terms ) || $this->terms <= 0 ) {

			$this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_TERMS ) );
		}
	}
public function termsValidator( $attribute, $params ) {

		if( $this->terms === 'on' ) {

			return;
		}

		if( !isset( $this->terms ) || $this->terms <= 0 ) {

			$this->addError( $attribute, Yii::$app->coreMessage->getMessage( CoreGlobal::ERROR_TERMS ) );
		}
	}
public function termsValidator ( $ attribute , $ params ) { if ( $ this -> terms === 'on' ) { return ; } if ( ! isset ( $ this -> terms ) || $ this -> terms <= 0 ) { $ this -> addError ( $ attribute , Yii :: $ app -> coreMessage -> getMessage ( CoreGlobal :: ERROR_TERMS ) ) ; } }
Check whether user agreed to terms and conditions.

@param string $attribute
@param array $params
Check whether user agreed to terms and conditions .