Tooark.Attributes 3.3.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tooark.Attributes --version 3.3.4
                    
NuGet\Install-Package Tooark.Attributes -Version 3.3.4
                    
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="Tooark.Attributes" Version="3.3.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tooark.Attributes" Version="3.3.4" />
                    
Directory.Packages.props
<PackageReference Include="Tooark.Attributes" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tooark.Attributes --version 3.3.4
                    
#r "nuget: Tooark.Attributes, 3.3.4"
                    
#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.
#:package Tooark.Attributes@3.3.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tooark.Attributes&version=3.3.4
                    
Install as a Cake Addin
#tool nuget:?package=Tooark.Attributes&version=3.3.4
                    
Install as a Cake Tool

Tooark.Attributes

Biblioteca com validadores de atributos para propriedades ou campos.

Conteúdo

Atributos de Validação

1. Validação de Documento

Funcionalidade: Atributo de validação de documento.

  • Parâmetros:
    • EDocumentType type: Tipo de documento a ser validado.

Exemplo de Uso

2. Validação de Email

Funcionalidade: Atributo de validação de email.

Exemplo de Uso

3. Validação de Senha

Funcionalidade: Valida se a senha atende aos critérios de complexidade especificados. Padrão é exigir pelo menos um caractere minúsculo, maiúsculo, numérico, caractere especial e ter um comprimento mínimo de 8 caracteres.

Parâmetros:

  • bool lowercase: Exige carácter minúsculo. Padrão: true.
  • bool uppercase: Exige carácter maiúsculo. Padrão: true.
  • bool number: Exige carácter numérico. Padrão: true.
  • bool symbol: Exige carácter especial. Padrão: true.
  • int length: Tamanho mínimo da senha. Padrão: 8.

Exemplo de Uso

4. Validação de URL

Funcionalidade: Valida se o valor é uma URL válida.

Exemplo de Uso

5. Validação de Código Postal

Funcionalidade: Valida se o valor é um código postal válido.

Exemplo de Uso

Exemplo de Uso

Validação de Documento

using Tooark.Attributes;

public class Pessoa
{
  [DocumentValidation(EDocumentType.CPF)]
  public string Documento { get; set; }
}

Validação de Email

using Tooark.Attributes;

public class Contato
{
  [EmailValidation]
  public string Email { get; set; }
}

Validação de Senha

Validação de Senha com critérios padrão:

using Tooark.Attributes;

public class Usuario
{
  [PasswordValidation]
  public string Senha { get; set; }
}

Validação utilizando critérios:

using Tooark.Attributes;

public class Usuario
{
  [PasswordValidation(lowercase: true, uppercase: true, number: true, symbol: true, length: 8)]
  public string Senha { get; set; }
}

Validação de URL

using Tooark.Attributes;

public class Website
{
  [UrlValidation]
  public string Url { get; set; }
}

Validação de Código Postal

using Tooark.Attributes;

public class Endereco
{
  [ZipCodeValidation]
  public string CodigoPostal { get; set; }
}

Dependências

Contribuição

Contribuições são bem-vindas! Sinta-se à vontade para abrir issues e pull requests no repositório Tooark.Attributes.

Licença

Este projeto está licenciado sob a licença BSD 3-Clause. Veja o arquivo LICENSE para mais detalhes.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Tooark.Attributes:

Package Downloads
Tooark

Package with all Tooark resources for .NET applications.

Tooark.AspNetCore

Package with the ASP.NET Core specific pieces of Tooark for .NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.7.1 38 10/17/2026
4.7.0 311 9/30/2026
4.6.0 145 9/29/2026
4.5.0 120 9/29/2026
4.4.0 110 9/28/2026
4.3.0 112 9/26/2026
4.2.1 114 9/25/2026
4.2.0 124 9/20/2026
4.1.0 110 9/18/2026
4.0.1 125 8/25/2026
4.0.0 131 8/25/2026
3.3.6 114 9/18/2026
3.3.5 122 8/25/2026
3.3.4 129 8/12/2026
3.3.3 139 7/27/2026
3.3.2 280 6/11/2026
3.3.1 158 6/6/2026
2.3.5 102 9/18/2026
2.3.4 117 8/25/2026
2.3.3 125 7/27/2026
Loading failed