1.0.9 • Published 7 years ago
basic-validate-js v1.0.9
Basic Validate JS
You can validate JavaScript forms with Basic Validate JS.
Install:
Using npm:
$ npm i basic-validate-js --saveIn Node.js:
const basicValidate = require('basic-validate-js'); Example:
Text Validate
let textExample = basicValidate.textControl('Text'); // return true or falseEmail Validate
let emailExample = basicValidate.emailControl('example@example.com'); // return true or false Date Validate
//Format: DD/MM/YYYY
let dateExample = basicValidate.dateControl('05/09/2018'); // return true or false Iban Validate
let ibanExample = basicValidate.ibanControl('TR00 0006 2000 0001 9999 9999 99'); // return true or false Regex Validate
let numberPattern = /^(([0-9]*)|(([0-9]*)\.([0-9]*)))$/;
let patternExample = basicValidate.patternControl('1234567890', numberPattern); // return true or false