wip
This commit is contained in:
41
app/Http/Requests/Api/V1/Auth/AuthVerifyRequest.php
Normal file
41
app/Http/Requests/Api/V1/Auth/AuthVerifyRequest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\V1\Auth;
|
||||
|
||||
use App\Rules\VerificationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AuthVerifyRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'phone_number' => ['required', 'integer', 'between:61000000,65999999'],
|
||||
'code' => ['required', 'integer', new VerificationRule($this->phone_number)],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Body Parameters for scribe
|
||||
*
|
||||
* @return array<string, array<string, string>>
|
||||
*/
|
||||
public function bodyParameters(): array
|
||||
{
|
||||
return [
|
||||
'phone_number' => [
|
||||
'description' => 'Phone number to verify',
|
||||
'example' => '61929248',
|
||||
],
|
||||
'code' => [
|
||||
'description' => 'Code to verify',
|
||||
'example' => '99934',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user