Soenneker.Validators.Email.Syntax
11.0.1334
Prefix Reserved
dotnet add package Soenneker.Validators.Email.Syntax --version 11.0.1334
NuGet\Install-Package Soenneker.Validators.Email.Syntax -Version 11.0.1334
<PackageReference Include="Soenneker.Validators.Email.Syntax" Version="11.0.1334" />
<PackageVersion Include="Soenneker.Validators.Email.Syntax" Version="11.0.1334" />
<PackageReference Include="Soenneker.Validators.Email.Syntax" />
paket add Soenneker.Validators.Email.Syntax --version 11.0.1334
#r "nuget: Soenneker.Validators.Email.Syntax, 11.0.1334"
#:package Soenneker.Validators.Email.Syntax@11.0.1334
#addin nuget:?package=Soenneker.Validators.Email.Syntax&version=11.0.1334
#tool nuget:?package=Soenneker.Validators.Email.Syntax&version=11.0.1334
Soenneker.Validators.Email.Syntax
Checks email-address syntax through the EmailValidation parser, with controls for international addresses and top-level domains.
Install
dotnet add package Soenneker.Validators.Email.Syntax
Registration
using Soenneker.Validators.Email.Syntax.Registrars;
using Microsoft.Extensions.DependencyInjection;
services.AddEmailSyntaxValidatorAsSingleton();
The validator is stateless. Singleton registration is appropriate for most applications; AddEmailSyntaxValidatorAsScoped() is also available.
Usage
using Soenneker.Validators.Email.Syntax.Abstract;
bool valid = validator.Validate("person@example.com");
Defaults are:
allowInternational: trueallowTopLevelDomains: falselogOnInvalid: false
Enable top-level-domain addresses when inputs such as postmaster@dk should be accepted:
bool valid = validator.Validate(
"postmaster@dk",
allowInternational: true,
allowTopLevelDomains: true);
Set allowInternational: false when international characters in the address should be rejected.
Failure and logging behavior
Invalid syntax returns false. A null input throws ArgumentNullException from the underlying parser.
When logOnInvalid is true, the full rejected email address is written at debug level. Email addresses are personal data in many environments; keep this disabled unless that log content is acceptable and protected.
Syntax validation does not prove that the domain exists, publishes mail records, that the mailbox exists, or that the address belongs to the user. Combine it with the appropriate domain checks and verification flow for those requirements.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- EmailValidation (>= 1.4.0)
- Soenneker.Validators.Validator (>= 11.0.754)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.1334 | 191 | 10/27/2026 |
| 11.0.1333 | 100 | 10/26/2026 |
| 11.0.1332 | 95 | 10/26/2026 |
| 4.0.1330 | 103 | 10/25/2026 |
| 4.0.1329 | 419 | 10/14/2026 |
| 4.0.1328 | 98 | 10/14/2026 |
| 4.0.1327 | 107 | 10/14/2026 |
| 4.0.1326 | 95 | 10/14/2026 |
| 4.0.1321 | 105 | 10/13/2026 |
| 4.0.1320 | 94 | 10/13/2026 |
| 4.0.1318 | 136 | 10/11/2026 |
| 4.0.1317 | 101 | 10/11/2026 |
| 4.0.1316 | 405 | 9/24/2026 |
| 4.0.1315 | 110 | 9/24/2026 |
| 4.0.1314 | 272 | 9/15/2026 |
| 4.0.1313 | 109 | 9/15/2026 |
| 4.0.1312 | 136 | 9/14/2026 |
| 4.0.1311 | 114 | 9/14/2026 |
| 4.0.1310 | 152 | 9/8/2026 |
| 4.0.1309 | 139 | 9/4/2026 |
Remove redundant framework conditions