Unclaimable.FluentValidation
0.8.5
dotnet add package Unclaimable.FluentValidation --version 0.8.5
NuGet\Install-Package Unclaimable.FluentValidation -Version 0.8.5
<PackageReference Include="Unclaimable.FluentValidation" Version="0.8.5" />
<PackageVersion Include="Unclaimable.FluentValidation" Version="0.8.5" />
<PackageReference Include="Unclaimable.FluentValidation" />
paket add Unclaimable.FluentValidation --version 0.8.5
#r "nuget: Unclaimable.FluentValidation, 0.8.5"
#:package Unclaimable.FluentValidation@0.8.5
#addin nuget:?package=Unclaimable.FluentValidation&version=0.8.5
#tool nuget:?package=Unclaimable.FluentValidation&version=0.8.5
Unclaimable.FluentValidation
FluentValidation rules for usernames and identifiers checked by Unclaimable.
Package version: 0.8.5 LTS
Install
Install the v0.8.5 LTS package once it is available on NuGet.org.
dotnet add package Unclaimable.FluentValidation --version 0.8.5
This package targets .NET 8 or newer and depends on Unclaimable and FluentValidation 12. FluentValidation is restored as a normal NuGet dependency; its license is Apache-2.0. The Unclaimable Core package does not acquire this dependency.
0.8.5 LTS
The optional FluentValidation 12 connector keeps the existing MustBeClaimable() and MustNotBeReserved() API. v0.8.5 updates the underlying Core checker with broader profanity coverage, faster matching, and an optional FalsePositiveSensitivity setting (default Low). No new FluentValidation runtime dependency is added to Core.
An injected IChecker continues to honor its configured Core options. Some values accepted with the v0.8.4 datasets may now fail validation.
Basic use
using FluentValidation;
using Unclaimable.FluentValidation;
public sealed class Signup
{
public string? Username { get; set; }
}
public sealed class SignupValidator : AbstractValidator<Signup>
{
public SignupValidator()
{
RuleFor(x => x.Username).NotEmpty().MustBeClaimable();
}
}
The rule accepts null; combine it with NotNull() or NotEmpty() for a required property. MustNotBeReserved() is an alias. The validator uses the same checker pipeline as Core, including scoped exception semantics. Only this optional connector brings the FluentValidation 12 dependency.
Use application settings
public sealed class SignupValidator : AbstractValidator<Signup>
{
public SignupValidator(IChecker checker)
{
RuleFor(x => x.Username)
.NotEmpty()
.MustNotBeReserved(checker)
.WithMessage("Choose another username.");
}
}
Register IChecker in your application's service container or supply your own instance. The rule follows that checker's captured options and live character policy. On failure, the default message includes MatchKind; the Category placeholder is also available in a custom message. Avoid exposing matched reserved values in public error messages.
| 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
- FluentValidation (>= 12.2.0)
- Unclaimable (>= 0.8.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.