diff --git a/app/Lib/CafelApi/Models/CafelBeaVol.php b/app/Lib/CafelApi/Models/CafelBeaVol.php index 2043da9..124726e 100644 --- a/app/Lib/CafelApi/Models/CafelBeaVol.php +++ b/app/Lib/CafelApi/Models/CafelBeaVol.php @@ -25,7 +25,7 @@ abstract class CafelBeaVol extends CafelClientModel // Eg Score A . 'bea_code' => 'required|string|min:2|max:10', // Eg 19377/0 . - 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]*\/\d$/', + 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', 'last_audit_date' => 'required|date_format:Y-m-d' ]; diff --git a/app/Lib/CafelApi/Models/CafelFood.php b/app/Lib/CafelApi/Models/CafelFood.php index 85ce7b7..bd3640a 100644 --- a/app/Lib/CafelApi/Models/CafelFood.php +++ b/app/Lib/CafelApi/Models/CafelFood.php @@ -28,7 +28,7 @@ abstract class CafelFood extends CafelClientModel // 1 Pondeuse ou 2 Poulet . 'food_type' => ['required', [EnumIsValidRule::class, FoodType::class]], // Eg 19377/0 . - 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]*\/\d$/', + 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', 'delivery_date' => 'required|date_format:Y-m-d' ]; diff --git a/app/Lib/CafelApi/Models/CafelMepEgg.php b/app/Lib/CafelApi/Models/CafelMepEgg.php index 1f53dc8..87ab9ea 100644 --- a/app/Lib/CafelApi/Models/CafelMepEgg.php +++ b/app/Lib/CafelApi/Models/CafelMepEgg.php @@ -25,7 +25,7 @@ abstract class CafelMepEgg extends CafelClientModel // Eg V072FXT (un seul par ligne). 'inuav_code' => 'required|string|regex:/^[A-Z]\d{3}[A-Z]{3}$/', // Eg 19377/0 . - 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]*\/\d$/', + 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', 'transfert_date' => 'required|date_format:Y-m-d' ]; diff --git a/app/Lib/CafelApi/Models/CafelMepPoultry.php b/app/Lib/CafelApi/Models/CafelMepPoultry.php index e0be9ce..f06c2f9 100644 --- a/app/Lib/CafelApi/Models/CafelMepPoultry.php +++ b/app/Lib/CafelApi/Models/CafelMepPoultry.php @@ -25,7 +25,7 @@ abstract class CafelMepPoultry extends CafelClientModel // Eg V072FXT (un seul par ligne). 'inuav_code' => 'required|string|regex:/^[A-Z]\d{3}[A-Z]{3}$/', // Eg 19377/0 . - 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]*\/\d$/', + 'batch_code' => 'required|max:10|regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', 'transfert_date' => 'required|date_format:Y-m-d' ];