type validation adjusted

This one is related with this [issue](https://github.com/yiisoft/yii2/issues/3774) .
no, i am about `type` attribute overall.