Files
online.tbbank.gov.tm-larave…/app/Http/Requests/UpdateUserProfileRequest.php
2024-09-09 23:04:59 +05:00

41 lines
1.0 KiB
PHP

<?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']
];
}
}