FluentvalidationBR.Extensions 2.4.3

dotnet add package FluentvalidationBR.Extensions --version 2.4.3
NuGet\Install-Package FluentvalidationBR.Extensions -Version 2.4.3
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="FluentvalidationBR.Extensions" Version="2.4.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentvalidationBR.Extensions --version 2.4.3
#r "nuget: FluentvalidationBR.Extensions, 2.4.3"
#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.
// Install FluentvalidationBR.Extensions as a Cake Addin
#addin nuget:?package=FluentvalidationBR.Extensions&version=2.4.3

// Install FluentvalidationBR.Extensions as a Cake Tool
#tool nuget:?package=FluentvalidationBR.Extensions&version=2.4.3

FluentvalidationBR.Extensions#

Built-In validation package for Fluentvalidation

How to install with Nuget ?

dotnet add package FluentvalidationBR.Extensions

What is this repository for?

This package aims to extend some built-in validations that we already have in fluent validations.

For now we have:

  • CnpjValidator
  • CpfValidator
  • IntegerValidator
  • UriValidator
  • CellPhoneValidator
  • PhoneValidator
  • CepValidator
  • IpValidator
  • IsUnique
  • EmailsValidator - Validate one or more separate emails with ';'

How do I use it?

class SampleValidator : AbstractValidator<Sample>
{
      public SampleValidator()
      {
          RuleFor(x => x.CellPhone).CellPhone();
          RuleFor(x => x.Number).Integer();
          RuleFor(x => x.Site).Uri();
          RuleFor(x => x.Cpf).Cpf();
          RuleFor(x => x.Cnpj).Cnpj();
          RuleFor(x => x.Cep).Cep();
          RuleFor(x => x.Phone).Phone();
          RuleFor(x => x.Ip).Ip();
          RuleFor(x => x.Items).IsUnique(x => x.Id);
          RuleFor(x => x.Items).IsUnique(x => x.ItemsB, x => x.Id);
          RuleFor(x => x.Codes).IsUnique();
          RuleFor(x => x.Emails).Emails(); //Validate one or more separate emails with ';'
      }
}

class Sample
{
     public string Site { get; set; }
     public string Number { get; set; }
     public string Cpf { get; set; }
     public string Cnpj { get; set; }
     public string CellPhone { get; set; }
     public string Phone { get; set; }
     public string Cep { get; set; }
     public string Ip { get; set; }
     public string Emails { get; set; }
     public IEnumerable<string> Codes { get; set; }
     public IEnumerable<Item> Items { get; set; }
     public IEnumerable<Item> ItemsA { get; set; }

}

class Item 
{
    public int Id { get; set; }
}

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
2.4.3 7,323 3/10/2023
2.4.2 29,794 7/4/2022
2.3.3 7,451 9/1/2021
2.3.2 298 9/1/2021
2.3.1 444 7/14/2021
1.3.1 526 3/30/2021
1.3.0 303 3/29/2021
1.2.0 434 3/13/2021
1.1.0 344 3/5/2021
1.0.0 343 3/5/2021

Add Unique Item List