I'm using a Yii2 MaskedInput plugin with a model for an integer field.
<?= $form->field($model, 'phone')->widget(MaskedInput::classname()([
'mask' => '(999) 999-9999'
MaskedInput will only generate a text field. I presume that your phone field is being stored as an integer. You'll have to change your validation of the phone field to be text, rather than integer. You may need to change the field type in your database to be varchar(14)