30 lines
648 B
PHP
30 lines
648 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class DepositRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'amount' => 'required|numeric|min:10000',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'amount.required' => 'Số tiền nạp không được bỏ trống.',
|
|
'amount.numeric' => 'Số tiền nạp phải là một số.',
|
|
'amount.min' => 'Số tiền nạp tối thiểu là :min đồng.',
|
|
];
|
|
}
|
|
}
|