one-validation
Regexp based validation collection for common internet validation tasks
Last updated 13 years ago by munter .
Repository · Original npm · Tarball · package.json
$ gnpm install one-validation 
SYNC missed versions from official npm registry.

one-validation

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

Examples

domain and domainIdn

validation.domain.test('foo.co.uk');
return true;
validation.domainIdn.test('hällo-test.de');
return true;

email and emailIdn

validation.email.test('test@foo.co.uk');
return true;
validation.domainIdn.test('test@hällo-test.de');
return true;

Building

npm install
make

Current Tags

  • 2.2.2                                ...           latest (6 years ago)

38 Versions

  • 2.2.2                                ...           6 years ago
  • 2.2.1                                ...           7 years ago
  • 2.2.0                                ...           9 years ago
  • 2.1.0                                ...           9 years ago
  • 2.0.0                                ...           10 years ago
  • 1.2.0                                ...           10 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.6.2                                ...           10 years ago
  • 0.6.1                                ...           10 years ago
  • 0.6.0                                ...           11 years ago
  • 0.5.0                                ...           11 years ago
  • 0.4.2                                ...           11 years ago
  • 0.4.1                                ...           12 years ago
  • 0.4.0                                ...           12 years ago
  • 0.3.0                                ...           12 years ago
  • 0.2.20                                ...           12 years ago
  • 0.2.19                                ...           12 years ago
  • 0.2.18                                ...           12 years ago
  • 0.2.17                                ...           12 years ago
  • 0.2.16                                ...           12 years ago
  • 0.2.15                                ...           12 years ago
  • 0.2.14                                ...           12 years ago
  • 0.2.13                                ...           12 years ago
  • 0.2.12                                ...           12 years ago
  • 0.2.11                                ...           12 years ago
  • 0.2.10                                ...           12 years ago
  • 0.2.9                                ...           12 years ago
  • 0.2.8                                ...           12 years ago
  • 0.2.7                                ...           13 years ago
  • 0.2.6                                ...           13 years ago
  • 0.2.5                                ...           13 years ago
  • 0.2.4                                ...           13 years ago
  • 0.2.3                                ...           13 years ago
  • 0.2.2                                ...           13 years ago
  • 0.2.1                                ...           13 years ago
  • 0.2.0                                ...           13 years ago
  • 0.1.0                                ...           13 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |