|
@@ -16,6 +16,11 @@ public function rules(): array
|
|
|
'contract_value' => "$required|numeric|min:0",
|
|
'contract_value' => "$required|numeric|min:0",
|
|
|
'contract_register_value' => "$required|numeric|min:0",
|
|
'contract_register_value' => "$required|numeric|min:0",
|
|
|
'contrat_discount_value' => 'nullable|numeric|min:0',
|
|
'contrat_discount_value' => 'nullable|numeric|min:0',
|
|
|
|
|
+ 'class_duration_minutes' => "$required|integer|min:1|max:1440",
|
|
|
|
|
+ 'weekday' => 'nullable|integer|min:0|max:6|required_with:start_time',
|
|
|
|
|
+ 'start_time' => 'nullable|date_format:H:i|required_with:weekday',
|
|
|
|
|
+ 'second_weekday' => 'nullable|integer|min:0|max:6|different:weekday|required_with:second_start_time',
|
|
|
|
|
+ 'second_start_time' => 'nullable|date_format:H:i|required_with:second_weekday',
|
|
|
|
|
|
|
|
'materials' => 'nullable|array',
|
|
'materials' => 'nullable|array',
|
|
|
'materials.*.product_id' => 'required_with:materials|integer|exists:products,id',
|
|
'materials.*.product_id' => 'required_with:materials|integer|exists:products,id',
|