obey-type-email-mailgun

1.1.1 • Public • Published

Obey Type Strategy Plugin for Mailgun Email Validation

Allows validating values and models with the Obey module against the Mailgun Email Validation API

Installation

npm install obey-type-email-mailgun --save

Usage

To use the plugin import/require both the Obey module and the plugin, then call the method from the plugin with the following arguments:

  1. The Obey module object
  2. Your Public API Key from Mailgun
const obey = require('Obey')
// Require type strategy plugin, provide Obey object and Mailgun Public API Key
require('obey-type-email-mailgun')(obey, 'XXXX-XXX-XXXX')

Once the above has been completed Obey will have the type strategy available as mailgunEmail:

const model = obey.model({
  email: { type: 'mailgunEmail' }
})

Testing

Ensure that an environment variable MAILGUN_API_KEY_PUBLIC is present with a valid Public API Key for Mailgun. Run npm test.

License

Obey is developed and maintained by TechnologyAdvice and released under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.1.1
    5
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i obey-type-email-mailgun

Weekly Downloads

5

Version

1.1.1

License

MIT

Last publish

Collaborators

  • fluidbyte