commons-validator-js
TypeScript icon, indicating that this package has built-in type declarations

1.0.1668 • Public • Published

commons-validator-js

NPM version Bower version Downloads

JavaScript port of Apache Commons Validator.

Usage - npm

Install the library with npm install commons-validator-js

var EmailValidator = require('commons-validator-js').EmailValidator;

var validator = new EmailValidator();
validator.isValid('chuck.norris@gmail.com'); //=> true
validator.isValid('chuck.norris@gmail.con'); //=> false (can your validator do this?)

Usage - bower

Install the library: bower install commons-validator-js. Add a reference: 'bower_components/commons-validator-js/dist/commons-validator-js.js'

Then use the global constructor: var EmailValidator = CommonsValidator.EmailValidator; and proceed as shown in the npm usage example above.

Package Sidebar

Install

npm i commons-validator-js

Weekly Downloads

32,877

Version

1.0.1668

License

Apache-2.0

Unpacked Size

344 kB

Total Files

20

Last publish

Collaborators

  • arielh
  • falconci
  • yurynix
  • itai.benda
  • wix-ci
  • wix-ambassador
  • shahata
  • netanelgilad
  • wix-ci-publisher
  • wix-bi-publisher