If-then validation rules for Yii2 Framework