changed regex pattern in panel box inspection page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m23s
Laravel Larastan / larastan (pull_request) Failing after 6m0s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Laravel Pint / pint (pull_request) Successful in 4m23s
Laravel Larastan / larastan (pull_request) Failing after 6m0s
This commit is contained in:
@@ -288,11 +288,11 @@ class PanelBoxInspectionStock extends Page
|
|||||||
{
|
{
|
||||||
$parts = explode('/', $itemId);
|
$parts = explode('/', $itemId);
|
||||||
|
|
||||||
if (count($parts) < 4) {
|
if (!preg_match('/^\d+\/\d+\/\d{4}\/\d+$/', $itemId) || preg_match('/[a-zA-Z]/', $itemId)) {
|
||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Invalid QR Format')
|
->title('Invalid QR Format')
|
||||||
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
|
->body("Expected format: plantcode/itemcode/yearmm/serialnumber : Format Received : $itemId")
|
||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -358,10 +358,11 @@ class PanelBoxInspectionStock extends Page
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Invalid QR Format')
|
->title('Invalid QR Format')
|
||||||
->body('Expected format: plantcode/itemcode/yearmm/serialnumber (Or) plantcode/panelboxcode/serialnumber')
|
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
|
||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
|
|||||||
Reference in New Issue
Block a user