Enhance production order validation to require numeric values with 7 to 14 digits across multiple resources
This commit is contained in:
@@ -335,7 +335,7 @@ class CreateProductionQuantity extends CreateRecord
|
||||
->send();
|
||||
return;
|
||||
}
|
||||
else if (!preg_match('/^[1-9][0-9]{6,}$/', $this->prodOrder))
|
||||
else if (!preg_match('/^[1-9][0-9]{6,13}$/', $this->prodOrder))
|
||||
{
|
||||
$this->form->fill([
|
||||
'plant_id'=> $this->pId,
|
||||
@@ -354,7 +354,7 @@ class CreateProductionQuantity extends CreateRecord
|
||||
|
||||
Notification::make()
|
||||
->title('Invalid Production Order')
|
||||
->body("Must contain at least 7 digits.<br>Must start with a non-zero digit.")
|
||||
->body("Must be a numeric value with 7 to 14 digits.<br>Must start with a non-zero digit.")
|
||||
->danger()
|
||||
->seconds(2)
|
||||
->send();
|
||||
|
||||
Reference in New Issue
Block a user