Files
unifiedpayment/app/Http/Requests/MpambaTnmRequest.php
2025-11-26 21:45:45 +00:00

44 lines
1017 B
PHP

<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class MpambaTnmRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function messages(){
return array(
'channel.required' => 'You need to specify the channel',
'wallet_id.required' => 'You need to specify the borker',
'refID.required' => 'No reference ID found',
// 'refID.unique' => 'Duplicate refID, check and try again'
);
}
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'msisdn' => 'required|regex:/\d{10}$/',
'amount' => 'required',
'channel' => 'required', //web, ussd, mobile app
'refID' => 'required',
'wallet_id' => 'required',
];
}
}