What is the problem? together
Insufficient funds in the account!
he leads
The value of "Amount" should not exceed 70.
public function rules() { return [ // username and password are both required [['id', 'mon'], 'required'], ['id', 'exist', 'targetAttribute' => 'id', 'targetClass'=> '\common\models\User', 'message' => Yii::t('frontend', 'Такого реферала не существует.') ], ['mon', 'number', 'min' => 0, 'max' => Yii::$app->user->identity->mon, 'message' => 'Недостаточно средств на счету!' ], ]; }