feat: implement deposit request validation and transaction API, refactor client routes, and update transaction schema.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user