vb-validator
v1.0.0
Published
Lightweight validation utility package for JavaScript and Node.js
Maintainers
Readme
vb-validator
Lightweight validation utility package for JavaScript and Node.js.
Installation
npm install vb-validatorUsage
const validator = require("vb-validator");
console.log(validator.isEmail("[email protected]"));
console.log(validator.isStrongPassword("12345678"));
console.log(validator.isPhone("9876543210"));
console.log(validator.isEmpty(""));Functions
isEmail(email)
Validate email format.
isStrongPassword(password)
Checks password length (minimum 8 characters).
isPhone(number)
Validates 10-digit phone number.
isEmpty(value)
Checks whether string is empty.
License
MIT
