Unclaimable.AspNetCore
0.7.8
See the version list below for details.
dotnet add package Unclaimable.AspNetCore --version 0.7.8
NuGet\Install-Package Unclaimable.AspNetCore -Version 0.7.8
<PackageReference Include="Unclaimable.AspNetCore" Version="0.7.8" />
<PackageVersion Include="Unclaimable.AspNetCore" Version="0.7.8" />
<PackageReference Include="Unclaimable.AspNetCore" />
paket add Unclaimable.AspNetCore --version 0.7.8
#r "nuget: Unclaimable.AspNetCore, 0.7.8"
#:package Unclaimable.AspNetCore@0.7.8
#addin nuget:?package=Unclaimable.AspNetCore&version=0.7.8
#tool nuget:?package=Unclaimable.AspNetCore&version=0.7.8
Unclaimable.AspNetCore
ASP.NET Core dependency-injection and DataAnnotations integration for Unclaimable.
Package version: 0.7.8
Install
dotnet add package Unclaimable.AspNetCore --version 0.7.8
The required Unclaimable core dependency is installed transitively.
Register services
using Microsoft.Extensions.DependencyInjection;
builder.Services.AddUnclaimable();
This registers the configured Options, a live singleton IPolicy, and an IChecker.
Configure the checker during registration:
builder.Services.AddUnclaimable(options =>
{
options.AdditionalReserved.Add("examplebrand");
options.AdditionalBlockedCharacters("^");
options.DisableCategory(Category.Brands);
});
Inject the checker
public sealed class AccountService
{
private readonly IChecker _checker;
public AccountService(IChecker checker)
{
_checker = checker;
}
public bool CanClaim(string userName) => _checker.IsClaimable(userName);
}
DataAnnotations
Use [ClaimableUsername] on a string property, field, or parameter:
using System.ComponentModel.DataAnnotations;
using Unclaimable.AspNetCore;
public sealed class SignupModel
{
[Required]
[ClaimableUsername]
public string UserName { get; set; } = string.Empty;
}
ClaimableUsernameAttribute accepts null, allowing [Required] or another required-field mechanism to remain independent.
When dependency injection is available, the attribute uses the registered IChecker. Otherwise it falls back to Checker.Default.
Validation messages
A custom attribute message can be supplied normally:
[ClaimableUsername(ErrorMessage = "Choose another username.")]
public string UserName { get; set; } = string.Empty;
Application-wide and reason-specific validation messages can also be configured through the registered Options.
Runtime character policy
The registered IPolicy remains live after startup:
var policy = app.Services.GetRequiredService<IPolicy>();
policy.BlockCharacter("@");
policy.AllowCharacter("@");
Startup Options are captured when the checker is constructed; runtime character-policy changes remain visible to that checker.
| 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.7.8)
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 |