Unclaimable.AspNetCore
0.4.0
See the version list below for details.
dotnet add package Unclaimable.AspNetCore --version 0.4.0
NuGet\Install-Package Unclaimable.AspNetCore -Version 0.4.0
<PackageReference Include="Unclaimable.AspNetCore" Version="0.4.0" />
<PackageVersion Include="Unclaimable.AspNetCore" Version="0.4.0" />
<PackageReference Include="Unclaimable.AspNetCore" />
paket add Unclaimable.AspNetCore --version 0.4.0
#r "nuget: Unclaimable.AspNetCore, 0.4.0"
#:package Unclaimable.AspNetCore@0.4.0
#addin nuget:?package=Unclaimable.AspNetCore&version=0.4.0
#tool nuget:?package=Unclaimable.AspNetCore&version=0.4.0
Unclaimable
Strict, fast username and identifier validation for .NET.
Current version: 0.4.0
Unclaimable helps decide whether a username, handle, slug, account name, tenant name, or similar identifier should be claimable. It combines curated reserved-name datasets with structural validation, impersonation protection, partial and compact matching, obfuscation detection, Unicode lookalikes, localized filtering, and application-specific rules.
Install
dotnet add package Unclaimable --version 0.4.0
ASP.NET Core integration:
dotnet add package Unclaimable.AspNetCore --version 0.4.0
Quick start
using Unclaimable;
var checker = new Checker();
if (checker.IsClaimable(userName))
{
// Continue with your own availability/database check.
}
ASP.NET Core:
builder.Services.AddUnclaimable();
Then inject IChecker where needed.
null is accepted by Unclaimable so required-field validation can remain a separate concern, for example through [Required].
What the default policy protects against
The default policy includes:
- reserved and protected names;
- identity and authentication impersonation;
- trusted-role and support impersonation;
- system and infrastructure identities;
- global brand and technology names;
- 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;
- curated safe-compound matching;
- compact separator/punctuation matching;
- common leetspeak and symbol substitutions;
- selected Unicode-confusable lookalikes;
- malformed UTF-16 rejection;
- invisible-only identifier rejection;
- Unicode control-character rejection;
- Unicode format-character rejection;
- minimum and maximum length rules;
- number restrictions;
- whitespace restrictions;
- blocked characters;
- leading and trailing separator restrictions.
IsReserved also reports structural validation failures. It therefore means “this value cannot be claimed under this checker,” not only “this literal exists in a reserved-name dataset.”
Dataset coverage
Version 0.4.0 contains 10,731 filter entries across 22 categories, representing 10,633 unique values within those categories.
| 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 |
Matching rules can reject many additional variants without storing every possible spelling as a separate dataset 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);
Strict defaults
new Options() uses a defensive baseline:
Strictness.Strict;- compact matching enabled;
- consistent compact-rule handling enabled;
- strict partial matching enabled;
- obfuscation matching enabled;
- Unicode-confusable matching enabled;
- profanity matching enabled;
- length
3through32; - numbers rejected;
- whitespace rejected;
- built-in
-and_blocked; - leading/trailing separators rejected;
- invisible-only identifiers rejected;
- Unicode control characters rejected;
- Unicode format characters rejected.
ASCII-only validation remains disabled because Unclaimable is Unicode-aware. Generic profanity substring matching also remains disabled to avoid unnecessary false positives.
Applications that legitimately require Unicode format characters such as joiners can relax that rule explicitly:
builder.Services.AddUnclaimable(options =>
{
options.RejectFormatCharacters = false;
});
Configuration
builder.Services.AddUnclaimable(options =>
{
options.AddLanguage(Language.Dutch);
options.MinimumLength = 4;
options.MaximumLength = 24;
options.AdditionalReserved.Add("examplebrand");
options.AdditionalBlockedCharacters("^", "$");
options.DisabledRules = Rule.Numbers;
});
Options are captured when a Checker is constructed. Runtime changes through IPolicy remain live.
Detailed results
var result = checker.Check(userName);
Console.WriteLine(result.IsClaimable);
Console.WriteLine(result.Category);
Console.WriteLine(result.MatchKind);
MatchStartIndex and MatchLength refer to the transformed matching text and use UTF-16 code units.
0.4.0 also exposes nullable original-input spans:
Console.WriteLine(result.OriginalMatchStartIndex);
Console.WriteLine(result.OriginalMatchLength);
They are populated only when the mapping back to the original input is reliable. When normalization makes the mapping uncertain, they remain null rather than returning an inaccurate highlight.
Length failures expose the effective threshold through Result.LengthLimit.
For multiple diagnostics:
var detailed = 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;
}
0.4.0 also ensures fallback minimum/maximum-length messages contain the effective captured threshold, including when [ClaimableUsername] runs without dependency injection.
0.4.0
0.4.0 strengthens the default validation policy while preserving the established public API, enum numeric values, and built-in dataset contents. It adds explicit malformed UTF-16 handling, strict invisible/control/format-character protection, consistent compact-rule behavior, original-input spans, captured length limits, and stronger package/release regression checks.
Full documentation and source:
| Product | Versions 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. |
-
net8.0
- Unclaimable (>= 0.4.0)
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 |