fix apis
This commit is contained in:
40
app/Http/Requests/UpdateUserProfileRequest.php
Normal file
40
app/Http/Requests/UpdateUserProfileRequest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class UpdateUserProfileRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
/**
|
||||
* Phone number to authenticate
|
||||
*
|
||||
* @example Mahmyt Allaberdiyev
|
||||
*/
|
||||
'name' => ['required', 'string', 'max:255'],
|
||||
|
||||
/**
|
||||
* Phone number to authenticate
|
||||
*
|
||||
* @example 65707012
|
||||
*/
|
||||
'phone' => ['required', 'int', 'between:61000000,71999999', Rule::unique('users', 'phone')->ignore(auth()->id())],
|
||||
|
||||
/**
|
||||
* Password (leave empty to save it same)
|
||||
*
|
||||
* @example Mpassword
|
||||
*/
|
||||
'password' => ['nullable', 'string']
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user