diff --git a/app/Lib/CafelApi/Models/CafelBeaVol.php b/app/Lib/CafelApi/Models/CafelBeaVol.php index 124726e..12d8031 100644 --- a/app/Lib/CafelApi/Models/CafelBeaVol.php +++ b/app/Lib/CafelApi/Models/CafelBeaVol.php @@ -25,7 +25,11 @@ 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|[A-Z])$/', + '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 bd3640a..c86715b 100644 --- a/app/Lib/CafelApi/Models/CafelFood.php +++ b/app/Lib/CafelApi/Models/CafelFood.php @@ -28,7 +28,11 @@ 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|[A-Z])$/', + '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 87ab9ea..95713f0 100644 --- a/app/Lib/CafelApi/Models/CafelMepEgg.php +++ b/app/Lib/CafelApi/Models/CafelMepEgg.php @@ -25,7 +25,11 @@ 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|[A-Z])$/', + '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 f06c2f9..cdcf79a 100644 --- a/app/Lib/CafelApi/Models/CafelMepPoultry.php +++ b/app/Lib/CafelApi/Models/CafelMepPoultry.php @@ -25,7 +25,11 @@ 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|[A-Z])$/', + 'batch_code' => [ + 'required', + 'max:10', + 'regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', + ], 'transfert_date' => 'required|date_format:Y-m-d' ];