['required', 'string', 'max:255'], 'email' => ['required', 'email', 'string', 'max:255', Rule::unique('users')->ignore(Auth::user())], 'password' => ['nullable', 'string', 'confirmed', 'min:8'], ]; } public function authorize() { return true; } protected function prepareForValidation() { if ($this->password == null) { $this->request->remove('password'); } } }