|string> */ public function rules(): array { $userId = $this->user()->id; return [ 'email' => [ 'required', 'string', 'email', 'max:255', Rule::unique('users', 'email')->ignore($userId), ], 'username' => [ 'required', 'string', 'max:20', 'alpha_dash', Rule::unique('users', 'username')->ignore($userId), ], 'full_name' => ['required', 'string', 'max:200'], 'phone_number' => ['nullable', 'string', 'max:20'], 'gender' => ['nullable', 'in:male,female'], 'birth_date' => ['nullable', 'date'], 'address' => ['nullable', 'string'], ]; } }