1.1.3 • Published 2 years ago
validathor-js v1.1.3
Validathor
Package to validate general data like cep, cnpj, phone and others.
Installation
Use the package manager yarn to install Validathor.
yarn install validathor-js
Usage
import Validathor from 'validathor-js'
const isCpfValid = Validathor.cpf('000.000.000-00') === true //returns false
const isCnpjValid = Validathor.cnpj('00.000.000/0000-00') === true //returns false
if(!isCnpjValid){
//TODO:: your error code here
return;
}
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Author
Follow me 🚀 Twitter GitHub LinkedIn