Files
2025-07-28 17:02:13 +07:00

40 lines
986 B
PHP

<?php
namespace App\Http\Requests\Recharge;
use Illuminate\Foundation\Http\FormRequest;
class RechargeRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'total_amount' => 'required|numeric|min:200000',
'bankCode' => 'nullable|string',
];
}
public function messages()
{
return [
'total_amount.required' => 'Vui lòng nhập số tiền cần nạp.',
'total_amount.numeric' => 'Số tiền phải là một số.',
'total_amount.min' => 'Số tiền nạp vui lòng lớn hơn hoặc bằng 200.000vnđ',
];
}
}