@asrar-fedlu/smart-validator
v1.0.0
Published
A lightweight JavaScript validation package for email, phone, and password validation.
Maintainers
Readme
Smart Validator
A lightweight JavaScript validation package for common form validation tasks.
Features
- Email validation
- Phone number validation
- Strong password validation
- Simple and reusable functions
- Tested with Vitest
Installation
npm install smart-validatorUsage
import { isEmail, isPhone, isStrongPassword } from "smart-validator";
console.log(isEmail("[email protected]"));
console.log(isPhone("+251911234567"));
console.log(isStrongPassword("Hello123!"));API
isEmail(value)
Returns true for a valid email format.
isPhone(value)
Returns true for a valid phone number format.
isStrongPassword(value)
Returns true when the password meets the package's strength requirements.
Development
Clone the repository:
git clone https://github.com/Asr13b/smart-validator.git
cd smart-validatorInstall dependencies:
npm installRun tests:
npm run test:runLicense
MIT
