Skip to main content
Drupal is a registered trademark of Dries Buytaert
EOL Warning: Drupal 11.0 has reached end of life and no longer receives security updates. Release: Private content 3.1.0 Minor update available for module private_content (3.1.0). Release: Webform Analysis 2.0.0 Major update available for module webform_analysis (2.0.0). Usage Milestone: Focal Point Module focal_point crossed 1,000 active installs. Release: Opensolr Search 4.3.1 Minor update available for module opensolr_search (4.3.1). Release: Opensolr Search 4.3.0 Minor update available for module opensolr_search (4.3.0). Release: Palette🎨 1.0.3 Minor update available for module canvas_palette (1.0.3). Release: Opensolr Search 4.2.4 Minor update available for module opensolr_search (4.2.4). Release: Changelogify 1.8.0 Minor update available for module changelogify (1.8.0). Release: Opensolr Search 4.2.3 Minor update available for module opensolr_search (4.2.3).

Email Typo Check

1 sites No security coverage Drupal 9–11
View on drupal.org

This module checks for common typos in email addresses as users type them, offering a "Did you mean?" suggestion. It focuses on correcting mistyped domains like "gmial.com" without blocking form submissions.

Suggests corrections for mistyped email domains — a non-blocking "Did you mean [email protected]?" hint shown when someone types gmial.com, yahoo.con, hotmial.com, and similar. It never blocks submission; it only offers a click-to-apply correction.

It wraps the actively maintained zootools/email-spell-checker (MIT) library, bundled for the browser.

Why this and not server-side validation?
Server-side validators catch malformed addresses (bad syntax, impossible TLDs). They cannot catch gmial.com, because that is a perfectly valid domain shape — it's just not what the user meant. This module targets exactly that typo class, on the client, as a suggestion. The two layers are complementary; keep your hard rejection server-side and use this for the "did you mean" nudge.

Usage
Option A — attach to everything (no code)
Enable Automatically attach to all forms at admin/config/content/email-typo-check.

Option B — attach selectively from your module (recommended)
Leave auto-attach off and call the service on the forms you care about:

// In hook_form_alter(), on the form render array root.
\Drupal::service('email_typo_check.attacher')->attach($form);

// Optional per-attachment overrides:
\Drupal::service('email_typo_check.attacher')->attach($form, [
  'selector' => 'input[type="email"], .my-custom-email input',
  'extra_domains' => ['mycompany.com'],
]);

The service (\Drupal\email_typo_check\EmailTypoCheckAttacherInterface) attaches the library and per-page settings; the client-side behaviour does the rest.

Extending the domain list
Site builders: add domains/TLDs on the settings form. Developers: implement hook_email_typo_check_domains_alter() (see email_typo_check.api.php). Both extend the library's built-in popular lists; they never replace them.

Third-party library
js/email-spell-checker.min.js is a bundled build of @zootools/email-spell-checker (MIT). See js/README.txt to regenerate or switch to a Composer/Asset-Packagist-managed copy before publishing on drupal.org.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Jul 2026
Latest release
1 month ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0 Stable 9–11 Jul 15, 2026