src/Base/Model.php
public static function validateMultiple($models, $attributeNames = null)
    {
        $promises = [];
        /* @var $model Model */
        foreach ($models as $model) {
            $promises[] = new Reaction\Promise\LazyPromise(function() use(&$model, $attributeNames) {
                return $model->validate($attributeNames);
            });
        }

        return Reaction\Promise\allInOrder($promises);
    }
public static function validateMultiple($models, $attributeNames = null)
    {
        $promises = [];
        /* @var $model Model */
        foreach ($models as $model) {
            $promises[] = new Reaction\Promise\LazyPromise(function() use(&$model, $attributeNames) {
                return $model->validate($attributeNames);
            });
        }

        return Reaction\Promise\allInOrder($promises);
    }
Validates multiple models.
This method will validate every model. The models being validated may
be of the same or different types.
@param array $models the models to be validated
@param array $attributeNames list of attribute names that should be validated.
If this parameter is empty, it means any attribute listed in the applicable
validation rules should be validated.
@return ExtendedPromiseInterface with bool whether all models are valid. RejectedPromise will be returned if one
or multiple models have validation error.