1
0
forked from poc/pds

Updated validations and success durations and added serial_number maximum length should be 20 digit and clear field if invalid input

This commit is contained in:
dhanabalan
2025-07-11 18:23:52 +05:30
parent 9fa4c0dd49
commit 27524c4d62
11 changed files with 360 additions and 291 deletions

View File

@@ -129,7 +129,7 @@ class LocatorInvoiceValidationImporter extends Importer
if (Str::length($invoiceNo) < 5 || !ctype_alnum($invoiceNo)) {
$warnMsg[] = "Invalid invoice number found";
}
if (Str::length($serialNo) < 9 || !ctype_alnum($serialNo)) {
if (Str::length($serialNo) < 9 || Str::length($serialNo) > 20 || !ctype_alnum($serialNo)) {
$warnMsg[] = "Invalid serial number found";
}
if (Str::length($palletNo) > 0 && Str::length($palletNo) < 10) {

View File

@@ -122,7 +122,7 @@ class PalletValidationImporter extends Importer
}
else
{
if (Str::length($serialNo) < 9 || !ctype_alnum($serialNo)) {
if (Str::length($serialNo) < 9 || Str::length($serialNo) > 20 || !ctype_alnum($serialNo)) {
$warnMsg[] = "Invalid serial number found";
}
if (Str::length($palletNo) > 0 && Str::length($palletNo) < 10) {

View File

@@ -148,7 +148,7 @@ class ReworkLocatorInvoiceValidationImporter extends Importer
if (Str::length($invoiceNo) < 5 || !ctype_alnum($invoiceNo)) {
$warnMsg[] = "Invalid invoice number found";
}
if (Str::length($serialNo) < 9 || !ctype_alnum($serialNo)) {
if (Str::length($serialNo) < 9 || Str::length($serialNo) > 20 || !ctype_alnum($serialNo)) {
$warnMsg[] = "Invalid serial number found";
}
if (Str::length($palletNo) > 0 && Str::length($palletNo) < 10) {