Unclaimable.AspNetCore 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Unclaimable.AspNetCore --version 0.3.0
                    
NuGet\Install-Package Unclaimable.AspNetCore -Version 0.3.0
                    
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="Unclaimable.AspNetCore" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Unclaimable.AspNetCore" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Unclaimable.AspNetCore" />
                    
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 Unclaimable.AspNetCore --version 0.3.0
                    
#r "nuget: Unclaimable.AspNetCore, 0.3.0"
                    
#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 Unclaimable.AspNetCore@0.3.0
                    
#: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=Unclaimable.AspNetCore&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Unclaimable.AspNetCore&version=0.3.0
                    
Install as a Cake Tool

Unclaimable

Strict, fast username and identifier validation for .NET.

Current version: 0.3.0

Unclaimable helps decide whether a username, handle, slug, account name, or similar identifier should be claimable.

It combines curated reserved-name datasets with structural validation rules, impersonation protection, obfuscation detection, Unicode lookalike handling, localized profanity filtering, and configurable application-specific rules.

Install

dotnet add package Unclaimable --version 0.3.0

For ASP.NET Core integration:

dotnet add package Unclaimable.AspNetCore --version 0.3.0

Quick start

using Unclaimable;

var checker = new Checker();

if (checker.IsClaimable(userName))
{
    // Identifier passed the default policy.
}

ASP.NET Core:

builder.Services.AddUnclaimable();

Then inject IChecker where needed:

public sealed class UsernameService(IChecker checker)
{
    public bool CanRegister(string userName) => checker.IsClaimable(userName);
}

What it protects against

The default policy includes:

  • reserved and protected names;
  • trusted-role and support impersonation;
  • system and infrastructure identities;
  • global brand and technology names;
  • identity and authentication identities;
  • moderation and governance identities;
  • finance and communications identities;
  • operations and developer identities;
  • security, automation, legal, commerce, community, official, and other protected categories;
  • localized profanity filtering;
  • strict partial matching;
  • safe compound matching for explicitly marked entries;
  • compact separator/punctuation matching;
  • common leetspeak and symbol substitutions;
  • selected Unicode-confusable lookalikes;
  • minimum and maximum length rules;
  • number restrictions;
  • whitespace restrictions;
  • blocked characters;
  • leading and trailing separator restrictions.

Dataset coverage

Version 0.3.0 contains 10,731 filter entries across 22 categories, representing 10,633 unique values within those categories. Localized language packs can contain the same literal value in more than one language, so entry counts can be higher than unique-value counts.

Category Filter entries Unique values
authentication 450 450
automation 32 32
brands 556 556
commerce 31 31
communications 450 450
community 22 22
developer 450 450
finance 450 450
governance 450 450
identity 1,500 1,498
infrastructure 450 450
legal 34 34
moderation 450 450
official 450 450
operations 450 450
other 24 24
profanity 861 848
roles 813 757
security 33 33
support 1,010 1,001
system 1,349 1,331
technology 416 416
Total 10,731 10,633

These counts include concrete entries expanded from schema-v2 dataset combinations. Matching rules such as compact matching, partial matching, safe compound matching, obfuscation detection, and Unicode-confusable detection can reject additional variants without storing every variant as a separate filter entry.

Language support

English is enabled by default.

Additional localized datasets are available for:

  • Dutch
  • German
  • French
  • Spanish
  • Italian
  • Portuguese
  • Polish
  • Turkish
  • Indonesian
  • Czech
  • Vietnamese
  • Hungarian
  • Swedish
  • Romanian

Languages are additive:

var options = new Options();
options.AddLanguage(Language.Dutch);
options.AddLanguage(Language.German);

var checker = new Checker(options);

Configuration

Example:

builder.Services.AddUnclaimable(options =>
{
    options.AddLanguage(Language.Dutch);

    options.MinimumLength = 4;
    options.MaximumLength = 24;

    options.AdditionalReserved.Add("examplebrand");
    options.AdditionalBlockedCharacters("^", "$");

    options.DisabledRules = Rule.Numbers;
});

Application-specific reserved values participate in the same normalization and matching pipeline as the built-in datasets.

Detailed results

var result = checker.Check("support-team");

Console.WriteLine(result.IsReserved);
Console.WriteLine(result.Category);
Console.WriteLine(result.MatchKind);

For diagnostics that may contain multiple failures:

var result = checker.CheckDetailed(userName, includeMessages: true);

ASP.NET Core DataAnnotations

using System.ComponentModel.DataAnnotations;
using Unclaimable.AspNetCore;

public sealed class SignupModel
{
    [Required]
    [ClaimableUsername]
    public string UserName { get; set; } = string.Empty;
}

More information

Full documentation, dataset details, configuration guidance, source code, and development information are available on GitHub:

https://github.com/Perry3Dnl/Unclaimable

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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
1.0.0 130 10/28/2026
0.8.5 936 10/14/2026
0.8.4 177 10/12/2026
0.8.3 105 10/9/2026
0.8.2 121 10/2/2026
0.8.1 105 10/2/2026
0.8.0 5,814 9/21/2026
0.7.8 1,167 9/18/2026
0.7.7 163 9/18/2026
0.7.6 183 9/18/2026
0.7.4 131 9/17/2026
0.7.0 689 9/15/2026
0.6.0 221 9/15/2026
0.5.0 302 9/9/2026
0.4.0 122 9/9/2026
0.3.0 128 9/8/2026
0.2.0 124 9/8/2026
0.1.0 170 9/8/2026