1
0
forked from poc/pds

Enhance production order validation to require numeric values with 7 to 14 digits across multiple resources

This commit is contained in:
dhanabalan
2025-08-04 19:35:50 +05:30
parent 68d4240ab0
commit d6c77bd6c3
5 changed files with 164 additions and 101 deletions

View File

@@ -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();