All Projects → wix → commons-validator-js

wix / commons-validator-js

Licence: Apache-2.0 license
JavaScript port of Apache Commons Validator

Programming Languages

javascript
184084 projects - #8 most used programming language

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('[email protected]'); //=> true
validator.isValid('[email protected]'); //=> 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].