Soenneker.Validators.Email.Syntax
4.0.1307
Prefix Reserved
dotnet add package Soenneker.Validators.Email.Syntax --version 4.0.1307
NuGet\Install-Package Soenneker.Validators.Email.Syntax -Version 4.0.1307
<PackageReference Include="Soenneker.Validators.Email.Syntax" Version="4.0.1307" />
<PackageVersion Include="Soenneker.Validators.Email.Syntax" Version="4.0.1307" />
<PackageReference Include="Soenneker.Validators.Email.Syntax" />
paket add Soenneker.Validators.Email.Syntax --version 4.0.1307
#r "nuget: Soenneker.Validators.Email.Syntax, 4.0.1307"
#:package Soenneker.Validators.Email.Syntax@4.0.1307
#addin nuget:?package=Soenneker.Validators.Email.Syntax&version=4.0.1307
#tool nuget:?package=Soenneker.Validators.Email.Syntax&version=4.0.1307
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 | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- EmailValidation (>= 1.4.0)
- Soenneker.Validators.Validator (>= 4.0.737)
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 |
|---|---|---|
| 4.0.1307 | 32 | 8/31/2026 |
| 4.0.1306 | 40 | 8/30/2026 |
| 4.0.1305 | 52 | 8/29/2026 |
| 4.0.1304 | 38 | 8/29/2026 |
| 4.0.1303 | 43 | 8/29/2026 |
| 4.0.1301 | 324 | 8/17/2026 |
| 4.0.1300 | 125 | 8/12/2026 |
| 4.0.1299 | 178 | 7/28/2026 |
| 4.0.1298 | 115 | 7/27/2026 |
| 4.0.1297 | 225 | 7/16/2026 |
| 4.0.1295 | 138 | 7/14/2026 |
| 4.0.1294 | 602 | 6/18/2026 |
| 4.0.1292 | 284 | 6/9/2026 |
| 4.0.1291 | 200 | 6/5/2026 |
| 4.0.1289 | 348 | 5/12/2026 |
| 4.0.1287 | 387 | 4/21/2026 |
| 4.0.1286 | 135 | 4/14/2026 |
| 4.0.1285 | 174 | 3/13/2026 |
| 4.0.1284 | 130 | 3/12/2026 |
| 4.0.1283 | 134 | 3/12/2026 |
Update dependency Soenneker.Validators.Validator to 4.0.737 (#1856)