HeroKit.FluentValidation
3.1.0
See the version list below for details.
dotnet add package HeroKit.FluentValidation --version 3.1.0
NuGet\Install-Package HeroKit.FluentValidation -Version 3.1.0
<PackageReference Include="HeroKit.FluentValidation" Version="3.1.0" />
<PackageVersion Include="HeroKit.FluentValidation" Version="3.1.0" />
<PackageReference Include="HeroKit.FluentValidation" />
paket add HeroKit.FluentValidation --version 3.1.0
#r "nuget: HeroKit.FluentValidation, 3.1.0"
#:package HeroKit.FluentValidation@3.1.0
#addin nuget:?package=HeroKit.FluentValidation&version=3.1.0
#tool nuget:?package=HeroKit.FluentValidation&version=3.1.0
HeroKit.FluentValidation
FluentValidation rules for HeroKit: Turkish identity and tax numbers, IBAN, Turkish phone numbers, postal codes, vehicle plates and card numbers.
dotnet add package HeroKit.FluentValidation
using FluentValidation;
using HeroKit.FluentValidation;
public sealed class CustomerValidator : AbstractValidator<Customer>
{
public CustomerValidator()
{
RuleFor(x => x.IdentityNumber).NotEmpty().Tckn();
RuleFor(x => x.TaxId).TaxIdTr();
RuleFor(x => x.Iban).Iban();
RuleFor(x => x.Mobile).TurkishPhone(mobileOnly: true);
RuleFor(x => x.PostalCode).PostalCodeTr();
RuleFor(x => x.Plate).PlateTr();
RuleFor(x => x.Card).CardNumber();
}
}
Null and empty values pass; add NotEmpty() to require a value. Messages use {PropertyName} and can be replaced with WithMessage.
Documentation: https://herokit.emreakdemir.dev/articles/validation.html
| 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 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. |
-
net10.0
- FluentValidation (>= 12.0.0)
- HeroKit (>= 3.1.0)
-
net8.0
- FluentValidation (>= 12.0.0)
- HeroKit (>= 3.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Country rules work with Countries.UnitedStates: PhoneNumber, PostalCode, NationalId (SSN) and TaxId (SSN, ITIN, EIN). Upgrading from 1.x or 2.x: https://herokit.emreakdemir.dev/articles/upgrading.html