/**
  * @inheritdoc
  */
 public function rules()
 {
     return [['email', 'filter', 'filter' => 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'exist', 'targetClass' => User::className(), 'filter' => ['statusId' => User::STATUS_ACTIVE], 'message' => Yii::t('error', 'There is no user with such email.')]];
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [['email', 'filter', 'filter' => 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => User::className()], ['password', 'required'], ['password', PasswordValidator::className()], ['verifyCode', 'captcha']];
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getUser()
 {
     return $this->hasOne(User::className(), ['id' => 'userId']);
 }