[ 'required', 'string', 'max:255', Rule::unique('users')->ignore($this->user()->id), ], 'email' => [ 'required', 'email', 'max:255', Rule::unique('users')->ignore($this->user()->id), ], 'password' => 'required', ]; } /** * Prepare the data for validation. * * @return void */ protected function prepareForValidation() { $this->merge([ 'email' => strtolower($this->email), ]); } }