Regexp based validation collection for common internet validation tasks
Latest commit 57cae9d Jun 15, 2015 @mwoc mwoc 2.2.0
Failed to load latest commit information.
test Add tests, fix implementation of rootRelativeUrl Jun 15, 2015
.gitignore Added jshint and coverage. Jul 22, 2014
.jshintignore Added jshint and coverage. Jul 22, 2014
.jshintrc Added jshint and coverage. Jul 22, 2014
.travis.yml Added Travis config. Jul 21, 2014 Added jshint and coverage. Jul 22, 2014
component.json Update component.json to match reality Jul 22, 2014
package.json 2.2.0 Jun 15, 2015


NPM version Build Status Coverage Status Dependency Status

This is a collection of regular expressions for general validation purposes. The basic design concept is to split up the regexes into semantic parts of the pattern to match. As an example a url consists of many parts like scheme, optional userinfo, subdomain, domain, toplevel domain, path, query and fragment. It is a lot easier to write a maintainable and reusable regular expression by mathing each of these parts individually and write a regex that combines the individual later.

The library includes a TLD whitelist that can be updated using make.

This module works as a NodeJS CommonJS module, a require.js AMD module and falls back to exposing itself in the global scope on one.validation if included directly in the page.

Package managers:

  • npm: npm install one-validation
  • bower: bower install validation

Supported patterns

  • domain
  • email
  • url


domain and domainIdn

return true;
return true;

email and emailIdn'');
return true;
return true;


npm install