28 lines
779 B
PHP
28 lines
779 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Client;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class ProfileUpdateRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'fullname' => ['required', 'string', 'max:255'],
|
|
'birthdate' => ['nullable', 'date'],
|
|
'national_code' => ['required', 'string', 'max:20'],
|
|
'email' => ['nullable', 'email', 'max:255'],
|
|
'province' => ['nullable', 'string', 'max:255'],
|
|
'city' => ['nullable', 'string', 'max:255'],
|
|
'address' => ['nullable', 'string', 'max:500'],
|
|
'avatar' => ['nullable', 'image', 'mimes:png,jpg,jpeg', 'max:10240'],
|
|
];
|
|
}
|
|
}
|