Tooark.Attributes 2.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tooark.Attributes --version 2.0.6
                    
NuGet\Install-Package Tooark.Attributes -Version 2.0.6
                    
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="2.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tooark.Attributes" Version="2.0.6" />
                    
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 2.0.6
                    
#r "nuget: Tooark.Attributes, 2.0.6"
                    
#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@2.0.6
                    
#: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=2.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Tooark.Attributes&version=2.0.6
                    
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

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

Package Downloads
Tooark

Package with all Tooark resources for .NET applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.8 139 6/26/2025
2.1.7 144 6/17/2025
2.1.6 143 6/15/2025
2.1.5 151 6/14/2025
2.1.4 151 6/3/2025
2.1.3.3 141 6/3/2025
2.1.3.2 141 6/3/2025
2.1.3 143 6/3/2025
2.1.2 116 5/17/2025
2.1.1 84 5/3/2025
2.1.0 78 5/3/2025
2.0.8 88 4/26/2025
2.0.7 172 4/22/2025
2.0.6 168 4/20/2025
2.0.5 157 3/14/2025
2.0.4 159 3/14/2025
2.0.3 166 3/14/2025
2.0.2 162 3/13/2025