Yii2 validator for either attributes is required
composer require "panwenbin/yii2-eithervalidator"
Add a rule similar to the following to rules of the model
[
['email'],
EitherValidator::className(),
'eitherAttributes' => ['phone'],
'message' => Yii::t('app', 'Either attribute {attribute}, {either_attributes} is required')
]