Change Cafel Api regex validation for Batch Code allow batch_code like 30639/A

This commit is contained in:
Jérémy Munsch 2022-10-27 12:14:58 +02:00
parent 85d7015157
commit a88f61686f
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
4 changed files with 4 additions and 4 deletions

View file

@ -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'
];

View file

@ -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'
];

View file

@ -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'
];

View file

@ -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'
];