Added support for the array to the method hasErrors() of the \yii\base\Model

Made these changes, because is not the first time need them.
A simple example:
In the view, form is divided into blocks. If all the fields in the block are valid then the block is constricted.
```php
//view
<div class="<?= $model->hasErrors(['first', 'second', 'third']) ? "open" : "close"; ?>">
</div>
```