@codedreams/validations

Welcome to the Code Dreams form validations package here you will find out all the helpers that we use on our projects

Usage no npm install needed!

<script type="module">
  import codedreamsValidations from 'https://cdn.skypack.dev/@codedreams/validations';
</script>

README

Welcome to Code Dreams Validations

Welcome to the Code Dreams form validations package here you will find out all the helpers that we use on our projects

Whats the idea of this repository

Easily apply validations to forms, specially using yup.

How can i use the library?

Just add the library to your project and import it!

  1. Depend on it:
yarn add @codedreams/validations
  1. Import:
import { isValidFullName } from '@codedreams/validations'

Validations

Name Returns Arguments
isValidFullName truthy OR falsy (string)
isValidCep truthy OR falsy (string)
isValidCurrency truthy OR falsy (string)
isValidDDD truthy OR falsy (string)
isValidEmail truthy OR falsy (string)
isValidCpf truthy OR falsy (string)
isValidCnpj truthy OR falsy (string)
isValidPassword truthy OR falsy (string)
isValidDocument truthy OR falsy (string)
isValidPin truthy OR falsy (string, number?)
isValidPositiveValue truthy OR falsy (string)