@stone-ton/validaton
v2.14.2
Published
Lib for input validation
Downloads
264
Readme
@stone-ton/validaton
A simple but very useful library for input validations 🙂
Install 📦
Install via NPM:
npm install @stone-ton/validaton
Install via yarn:
yarn add @stone-ton/validaton
Usage 👨💻
import { validateEmail } from '@stone-ton/validaton'
const hasError = validateEmail('[email protected]')
// false
const hasError = validateEmail('[email protected]')
// 'Email inválido'
Functions 📖
| FunctionName
| ---------------------------------------|
| validateEmail()
|
| validatePhone()
|
| validateLandline()
|
| validateCep()
|
| validateName()
|
| validateCountryName()
|
| validateNumber()
|
| isRequired()
|
| validateBirthdate()
|
| validateCpf()
|
| validateCnpj()
|
| validateBussinessName()
|
| validateMcc()
|
| validateCardHolderName()
|
| validatePasswordRequirements()
|
| isAlphanumeric()
|