src/base/Model.php
public static function validateMultiple($models, $attributeNames = null, $clearErrors = true)
    {
        $valid = true;
        /* @var $model Model */
        foreach ($models as $model) {
            $valid = $model->validate($attributeNames, $clearErrors) && $valid;
        }

        return $valid;
    }
public static function validateMultiple($models, $attributeNames = null, $clearErrors = true)
    {
        $valid = true;
        /* @var $model Model */
        foreach ($models as $model) {
            $valid = $model->validate($attributeNames, $clearErrors) && $valid;
        }

        return $valid;
    }
public static function validateMultiple ( $ models , $ attributeNames = null , $ clearErrors = true ) { $ valid = true ; /* @var $model Model */ foreach ( $ models as $ model ) { $ valid = $ model -> validate ( $ attributeNames , $ clearErrors ) && $ valid ; } return $ valid ; }
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.
@param bool $clearErrors whether to call [[clearErrors()]] before performing validation. Default true
@return bool whether all models are valid. False will be returned if one
or multiple models have validation error.
Validates multiple models . This method will validate every model . The models being validated may be of the same or different types .