Mailcheck.js - check email for typos


    jQuery plugin Mailcheck (github) - a client side checking email for typos according to a predefined list (for example, the most popular email services).

    Demo | sorsa demos (jsfiddle)


    According to the statement (en) of the authors (Kicksend), this plugin increased the number of email confirmations during registration by 50%.






    For the plugin to check for typos in the Cyrillic domains , edit the sorts ( Line 30 ):
    var result = Kicksend.mailcheck.suggest(encodeURI(this.val()), opts.domains);
    replace encodeURI(this.val())with this.val()(important! encoding must be UTF-8)

    Check:




    Variant of illogical sentence


    The plugin uses the search algorithm for the largest common substring , which, in general, copes well with correction proposals (see the demo), however, there are non-trivial cases:

    Input data:
    domains: ["ua.com", "ui.com"]
    email: user@uo.com

    Conclusion: user @ u a .com

    If you look at the keyboard, it is obvious that “o” is closer to “i” - another domain - ui.com.

    I suggest that the habraisers discuss how to improve the algorithm so that it correctly fulfills similar typos.

    ( github issue # 20 )

    Also popular now: