39 lines
961 B
PHP
Executable File
39 lines
961 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Admin\Requests\Profile;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
use Illuminate\Validation\Validator;
|
|
|
|
class EditRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array<string, ValidationRule|array|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'username' => 'string|max:255',
|
|
'first_name' => 'required|string',
|
|
'last_name' => 'required|string',
|
|
'national_id' => 'required',
|
|
'email' => 'string|email|max:255',
|
|
'phone_number' => 'string',
|
|
'province_id' => 'string',
|
|
'city_id' => 'string',
|
|
];
|
|
}
|
|
}
|