GithubHelp home page GithubHelp logo

luis199230 / validator-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mailgun/validator-demo

0.0 2.0 0.0 216 KB

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

HTML 42.15% JavaScript 57.85%

validator-demo's Introduction

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

validator-demo's People

Contributors

msigley avatar eddywashere avatar jeremyschlatter avatar

Watchers

James Cloos avatar Luis Benavides avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.