vanilla-validation
v4.1.0
Published
Vanilla JavaScript validation rules
Downloads
66
Readme
vanilla-validation
Vanilla JavaScript validation rules
Usage
Install from npm:
npm install --save vanilla-validation
Use in project:
// get vanilla-validation from node_modules
const vRules = require('vanilla-validation');
// log vRules to see all rules available
console.log(vRules);
<input type="email" id="email" value="[email protected]">
// get email element
var emailElm = document.getElementById('email');
// test if element contains valid email
vRules.vrule_email(emailElm)