Loading src/Tools/ExcelImporter.php +7 −3 Original line number Original line Diff line number Diff line Loading @@ -141,11 +141,15 @@ class ExcelImporter public function checkNumeric($data, &$errorCount) public function checkNumeric($data, &$errorCount) { { foreach ($data as $k => $v) { foreach ($data as $k => $v) { if (!$v || $v === '') { continue; } else { if (!is_numeric($v)) { if (!is_numeric($v)) { $this->setErrorMessage("{$k}只能是数字", $errorCount); $this->setErrorMessage("{$k}只能是数字", $errorCount); return false; return false; } } } } } return true; return true; } } Loading Loading
src/Tools/ExcelImporter.php +7 −3 Original line number Original line Diff line number Diff line Loading @@ -141,11 +141,15 @@ class ExcelImporter public function checkNumeric($data, &$errorCount) public function checkNumeric($data, &$errorCount) { { foreach ($data as $k => $v) { foreach ($data as $k => $v) { if (!$v || $v === '') { continue; } else { if (!is_numeric($v)) { if (!is_numeric($v)) { $this->setErrorMessage("{$k}只能是数字", $errorCount); $this->setErrorMessage("{$k}只能是数字", $errorCount); return false; return false; } } } } } return true; return true; } } Loading