Fix validation for 'No of Operation' in resolveRecord method to include actual value in error message
This commit is contained in:
@@ -114,8 +114,8 @@ class LineImporter extends Importer
|
|||||||
|
|
||||||
$noOfOps = (int) ($this->data['no_of_operation'] ?? 0);
|
$noOfOps = (int) ($this->data['no_of_operation'] ?? 0);
|
||||||
|
|
||||||
if ($noOfOps == null || $noOfOps == '' || !is_numeric($noOfOps)) {
|
if (($noOfOps == null || $noOfOps == '' || !is_numeric($noOfOps)) && $noOfOps != 0) {
|
||||||
throw new RowImportFailedException("'No of Operation' is required and must be a number");
|
throw new RowImportFailedException("'No of Operation' is required and must be a number $noOfOps");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($noOfOps > 10)
|
if ($noOfOps > 10)
|
||||||
|
|||||||
Reference in New Issue
Block a user