[ 'bail', 'required', 'email:rfc,dns', 'max:254', new RegisterUniqueRecipient, 'not_in:'.$this->user()->email, ], 'current' => 'required|string|current_password', ]; } /** * Get the error messages for the defined validation rules. * * @return array */ public function messages() { return [ 'email.not_in' => 'That email is the same as the current one.', ]; } }