This method will validate every model. The models being validated may
be of the same or different types.
public static validateMultiple ( array $models, array $attributeNames = null ) : boolean | ||
$models | array | the models to be validated |
$attributeNames | array | 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 | boolean | whether all models are valid. False will be returned if one or multiple models have validation error. |