@yomade_j/validators
v1.0.1
Published
Small validators for emails, strong passwords and Nigerian phone numbers
Downloads
459
Maintainers
Readme
@yomade_j/validators
Small validators for emails, strong passwords and Nigerian phone numbers.
Every function returns true or false.
Install
npm install @yomade_j/validators
Usage
const { isEmail, isStrongPassword, isNigerianPhone } = require("@yomade/text-helpers");
Contains one @ and a . after it.
isEmail("[email protected]"); // true
isEmail("ada.example.com"); // false
At least 8 characters, with at least one number. isStrongPassword("secret123"); // true (8+ characters, at least one number) isStrongPassword("short1"); // false
11 digits starting with 0.
isNigerianPhone("08031234567"); // true (11 digits, starts with 0)
isNigerianPhone("8031234567"); // false
