Soenneker.Validators.Email.Syntax 4.0.1314

Prefix Reserved
dotnet add package Soenneker.Validators.Email.Syntax --version 4.0.1314
                    
NuGet\Install-Package Soenneker.Validators.Email.Syntax -Version 4.0.1314
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Validators.Email.Syntax" Version="4.0.1314" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Validators.Email.Syntax" Version="4.0.1314" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Validators.Email.Syntax" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Validators.Email.Syntax --version 4.0.1314
                    
#r "nuget: Soenneker.Validators.Email.Syntax, 4.0.1314"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Validators.Email.Syntax@4.0.1314
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Validators.Email.Syntax&version=4.0.1314
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Validators.Email.Syntax&version=4.0.1314
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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: true
  • allowTopLevelDomains: false
  • logOnInvalid: 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1314 58 9/15/2026
4.0.1313 49 9/15/2026
4.0.1312 85 9/14/2026
4.0.1311 60 9/14/2026
4.0.1310 121 9/8/2026
4.0.1309 116 9/4/2026
4.0.1308 93 9/4/2026
4.0.1307 119 8/31/2026
4.0.1306 101 8/30/2026
4.0.1305 110 8/29/2026
4.0.1304 99 8/29/2026
4.0.1303 102 8/29/2026
4.0.1301 376 8/17/2026
4.0.1300 138 8/12/2026
4.0.1299 190 7/28/2026
4.0.1298 127 7/27/2026
4.0.1297 234 7/16/2026
4.0.1295 157 7/14/2026
4.0.1294 610 6/18/2026
4.0.1292 289 6/9/2026
Loading failed

Update dependency Soenneker.Validators.Validator to 4.0.741 (#1896)