Skip to content

EmailAddressAttribute isn't validating properly #129393

@PatrykKuniczak

Description

@PatrykKuniczak

Description

Related to #65968
And
https://stackoverflow.com/a/71303601

Validation is very weak ...

Reproduction Steps

Let's use in any project

[EmailAddress]
public string Email { get; set; };

And try to use example@com and see it's valid.

That's at least bizzare, that in 2026, there's still a problem, for that big tool like .NET, to create an email validator.

Expected behavior

Work at least like:
https://stackoverflow.com/a/201336

Actual behavior

Pass example@com and more strange emails ...

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions