npm

Need private packages and team management tools?Check out npm Orgs. »

commons-validator-js

1.0.1414 • 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.

install

npm i commons-validator-js

Downloadsweekly downloads

3,072

version

1.0.1414

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability