0.0.4 • Published 9 years ago

validity-mailto-link v0.0.4

Weekly downloads
6
License
ISC
Repository
github
Last release
9 years ago

validity-mailto-link

Validate the current property is a mailto link

E.g it is in the format 123@example.com

Installation

npm install validity-mailto-link --save

Usage

Below is a simple example for usage with schemata and save:

var validity = require('validity')
  , schemata = require('schemata')
  , save = require('save')
  , collection = save('author')
  , validateMailtoLink = require('validity-mailto-link')

var schema = schemata(
    { type:
      { type: String
      }
    , email:
      { type: String
      , validators: { all: [ validateMailtoLink() ] }
      }
    })

Credits

Ben Parnell