Code Monkey home page Code Monkey logo

flunt.br's Introduction

alt text

Flunt.Br

Build status NuGet

About

Flunt.Br is a lib with a set of extensions for Flunt to validate Brazilian attributes, like cpf, cnpj, cep and phone

Sobre

Flunt.Br é uma biblioteca com um conjunto de extensões para o Flunt para validar atributos Brasileiros, como cpf, cnpj, cep e telefone.

Instalation / Instalação

This package is available through Nuget Packages / Esse pacote está disponível através de um pacote nuget: https://www.nuget.org/packages/Flunt.Br

Nuget

Install-Package Flunt.Br

.NET CLI

dotnet add package Flunt.Br

Usage

This lib enables in your validation contracts this methods:

var contratct = new Contract()
    .IsCpf(person.document, "Document", "Invalid document")
    .IsCnpj(company.document, "Document", "Invalid document")
    .IsPhone(company.phone, "Phone", "Invalid phone")
    .IsCellPhone(person.cellphone, "Phone", "Invalid cellphone")
    .IsNewFormatCellPhone(person.cellphone, "Phone", "Invalid cellphone")
    .IsCep(company.Cep, "Cep", "Invalid Cep")
    .IsVoterDocument(person.VoterDocument, "VoterDocument", "Invalid Voter Document")
    .IsCreditCard(person.CreditCardNumber, "CreditCardNumber", "Invalid Credit Card");

Como Usar

Essa biblioteca possibilita esses métodos em seus Validation Contracts:

var contratct = new Contract()
    .IsCpf(pessoa.documento, "Documento", "Documento inválido")
    .IsCnpj(empresa.documento, "Documento", "Documento inválido")
    .IsPhone(empresa.telefone, "Telefone", "Telefone inválido")
    .IsCellPhone(pessoa.telefone, "Telefone", "Telefone inválido")
    .IsNewFormatCellPhone(pessoa.telefone, "Telefone", "Telefone inválido")
    .IsCep(company.Cep, "Cep", "Cep Inválido")
    .IsVoterDocument(person.VoterDocument, "TituloDoEleitor", "Título do Eleitor inválido")
    .IsCreditCard(person.CreditCardNumber, "NumeroCartaoDeCredito", "Número de cartão de crédito inválido");

Contributors

The logo was made by Chrysthowam Santos, Thanks!

Contribuidores

A logo foi feita por Chrysthowam Santos, Obrigado!

flunt.br's People

Contributors

lira92 avatar marcoscostadev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.