cms icon indicating copy to clipboard operation
cms copied to clipboard

[5.x]: E-Mail validation rejects a valid e-mail address with ß or other German umlauts

Open MoritzLost opened this issue 11 months ago • 2 comments

What happened?

Description

I've got a client that has the German special character ß in their e-mail address. While unusual, it is a valid address. However, I can't create a user account because Craft rejects it:

Image

Error: Email is not a valid email address.

Steps to reproduce

  1. Create a new user with the email address specialß[email protected] and hit save.

Expected behavior

Any valid email should pass validation, including emails with ß in it.

Actual behavior

The email is incorrectly identified as invalid and I can't save the user account.

Craft CMS version

5.6.11

PHP version

8.3

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

MoritzLost avatar Mar 27 '25 11:03 MoritzLost

@i-just Just encountered another case where a valid email address is rejected. Turns out German umlauts (ä ö ü) cause an email to fails validation as well, despite being valid.

This is a problem because many Germans have an umlaut in their name. Most people transliterate that to use ASCII characters for their email address (ä → ae, ü → ue, ö → oe), but not everyone does this. I'm now working on a project where we're importing a lot of users from an external system, and we're seeing some cases where this is causing errors.

We need a fix for this, as I don't really know how to work around it. I know it's probably a pain to fix if it relies on the validator provided by Yii. But if that validator is producing incorrect results, maybe Craft needs to switch to an implementation that works correctly.

Can we get an ETA for when this will be addressed? Thanks!

MoritzLost avatar Oct 13 '25 12:10 MoritzLost

Hi Moritz, thanks for the nudge! I just raised a PR for this (currently targetting 5.9). We'll discuss this further internally today. I'll update this issue once I have more info.

i-just avatar Oct 14 '25 10:10 i-just