1.0.1 • Published 6 years ago
form-bs-check v1.0.1
Installation
In the terminal
npm install form-bs-check
In your text editor
var checker = require('form-bs-check');
API
checker.firstname(firstname, callback)
checker.firstname(firstname, (result) => {
if(result){
// firstname is valid
}else{
// firstname is not valid
}
});
checker.lastname(lastname, callback)
checker.lastname(lastname, (result) => {
if(result){
// lastname is valid
}else{
// firstname is not valid
}
});
checker.password(password, callback)
checker.password(password, (complexity) => {
// complexity = level of complexity of your password (0-4)
});
checker.form(form, callback)
checker.form(form, (result) => {
// result = the result of your form checking
});
This is not perfect but it is getting better by the day