Files
portal-api/app/Http/Requests/Api/Order/RenewServiceRequest.php
T
2026-09-27 11:42:40 +07:00

33 lines
759 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Api\Order;
use Illuminate\Foundation\Http\FormRequest;
class RenewServiceRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'months' => ['required', 'integer', 'min:1', 'max:36'],
];
}
public function messages(): array
{
return [
'months.required' => 'Vui lòng chọn số tháng gia hạn.',
'months.integer' => 'Số tháng gia hạn không hợp lệ.',
'months.min' => 'Số tháng gia hạn tối thiểu là 1.',
'months.max' => 'Số tháng gia hạn tối đa là 36.',
];
}
}