1.0.2 • Published 1 year ago
input-validator-by-bok v1.0.2
Form Input Validator
This JavaScript library provides functions for validating passwords and email addresses. Input validation is an essential aspect of web development to ensure data integrity, security, and a positive user experience.
Features
- Checks Uppercase
- Checks Lowercase
- Checks character counts
- Check symbols
- Checks numbers
- Matches basic email format
- Optionally checks if the email belongs to a specific domain
Prerequisites
- Install Node JS in your computer
Installation
npm install input-validator-by-bokUsage
These methods only returns a boolean value true/false
- countPasswordCharacters(password, length) - Checks password if above the given number of characters
- validatePassword(password) - Check if the password has uppercase, lowercase, symbol and numbers
- hasLowerCase(password) - Check if password has lowercases
- hasUpperCase(password) - Check if password has uppercases
- hasNumber(password) - Check if password has number
- hasSymbol(password) - Check if password has symbols
- isValidEmail(email) - Check if email match the basic format of an email
- isValidEmailForDomain(email, domain) - Check if email belongs to the domain