All Projects → mailgun → Validator Demo

mailgun / Validator Demo

Licence: apache-2.0
Mailgun email address jquery validation plugin http://mailgun.github.io/validator-demo/

Programming Languages

javascript
184084 projects - #8 most used programming language

Advanced jQuery Email Address Validator by Mailgun

Given an arbitrary address, Mailgun will validate the address based on:

  • Syntax checks (RFC defined grammar)
  • DNS validation
  • Spell checks
  • Email Service Provider (ESP) specific local-part grammar (if available)

How to use the email validator on your form

  1. Include jQuery
  2. Include mailgun_validator.js
  3. Sign up for a Mailgun account and insert your public API key
  4. Attach mailgun_validator() function to the email field you want validated
  5. Decide what should happen for valid emails, invalid emails and suggestions

Attaching to a form field:

   $('jquery_selector').mailgun_validator({
       api_key: 'api-key',
       in_progress: in_progress_callback, // called when request is made to validator
       success: success_callback,         // called when validator has returned
       error: validation_error,           // called when an error reaching the validator has occured
   });

Sample JSON in success callback:

 {
     "is_valid": true,
     "parts": {
         "local_part": "[email protected]",
         "domain": "example.com",
         "display_name": ""
     },
     "address": "[email protected]",
     "did_you_mean": null
 }

Demo

http://mailgun.github.io/validator-demo/

More information

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].