This commit is contained in:
Roly Rudy Gutierrez Pinto
2018-11-09 16:04:51 -04:00
parent 63946e5ea3
commit 8a3324aabc

View File

@@ -187,6 +187,20 @@ class ValidationUploadedFiles
if (empty($value)) {
continue;
}
if (is_array($value)) {
foreach ($value as $rowKey => $rowValue) {
foreach ($rowValue as $cellKey => $cellValue) {
if (empty($cellValue)) {
continue;
}
$validator = $this->runRules(['filename' => $cellValue, 'path' => $data->tmp_name[$key][$rowKey][$cellKey]]);
if ($validator->fails()) {
$this->fails[] = $validator;
}
}
}
continue;
}
$validator = $this->runRules(['filename' => $value, 'path' => $data->tmp_name[$key]]);
if ($validator->fails()) {
$this->fails[] = $validator;