reupload
This commit is contained in:
37
app/Http/Requests/Api/V1/Auth/AuthLoginRequest.php
Normal file
37
app/Http/Requests/Api/V1/Auth/AuthLoginRequest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Api\V1\Auth;
|
||||
|
||||
use App\Rules\VerificationRule;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class AuthLoginRequest 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 [
|
||||
/**
|
||||
* @example 61929248
|
||||
*/
|
||||
'phone_number' => ['required', 'integer', 'between:61000000,71999999', Rule::exists('users', 'phone_number')],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the error messages for the defined validation rules.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'phone_number.exists' => __('User with this phone number does not exist'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user