JSPM

commons-validator-js

1.0.112
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21481
  • Score
    100M100P100Q145831F
  • License Apache-2.0

JavaScript port of Apache Commons Validator

Package Exports

  • commons-validator-js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (commons-validator-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

commons-validator-js

NPM version Bower version Downloads

JavaScript port of Apache Commons Validator.

Usage

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?)

This library can also be installed using bower install commons-validator-js. Once you reference bower_components/commons-validator-js/dist/commons-validator-js.js you can then use the global variable var EmailValidator = CommonsValidator.EmailValidator; and proceed as shown in the npm example above.