Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Form accepts invalid emails: how to find and fix it

DLV-208Low impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Your form should refuse an email address that is clearly wrong. When it doesn't, the submission goes through with a value like asdf, test@test, john@gmail or a@b.c. The visitor sees a thank-you page, and you get a lead record with no usable contact detail.

This usually happens for one of four reasons: the field is a plain text box instead of an email field, validation was switched off in the form settings, a custom script replaced the built-in check, or the server accepts whatever the browser sends.

Why it costs you leads or sales

The business impact is low per lead, but it adds up. A real person who mistypes their address (for example name@gmial.com) is never caught, so you cannot reply and the lead is lost. Bad entries also fill your CRM, waste sales time, trigger bounced autoresponders and can harm your sending reputation. Reports on lead volume look better than the real number of reachable leads.

Where a bad email travels
  1. Visitor types emailname@gmial.com or just 'abc'
  2. Form validationAccepts the value
  3. AutoresponderBounces
  4. CRM recordNo way to contact
  5. Sales follow-upWasted effort

The form lets the typo through, so every later step works on an address that cannot receive mail.

Reachable leads out of 100 submissionsExample numbers
Reachable leads out of 100 submissions (example)No validation: 88 leads; With validation: 97 leads037748897No validationWith validationleads

Example: illustrative numbers only. With no validation, some entries are typos or junk and cannot be contacted.

How to check if your site has it

Test your own form with deliberately bad input. Use a private window and mark the entries clearly as tests so your team can delete them.

Try each of these in the email field
  • abc (no @ sign)
  • abc@ (nothing after the @)
  • @example.com (nothing before the @)
  • name@domain (no dot ending)
  • name@domain..com (double dot)
  • name @example.com (a space inside)
  • A very long string of 300 characters
  • Leave the field empty if it should be required

If any of these reaches the thank-you page, validation is missing. Next, disable JavaScript in your browser developer tools, or send the form with a tool such as curl. If the bad value is still accepted, the server is not checking it either.

How to fix it

Fix email validation
  1. Use an email field

    Make sure the input is type="email", not type="text". Browsers then check the basic shape and show the right mobile keyboard.

  2. Mark it required

    Set the field as required so an empty value is refused.

  3. Turn on your form tool's own validation

    Check the platform steps below. Most builders have a field type or setting for email.

  4. Validate again on the server

    Check the address in your handler code or form plugin before saving or sending it on.

  5. Show a clear error

    Tell the visitor what to fix, for example 'Please enter an email like name@example.com', and keep what they already typed.

Where to switch it on, by platform
  1. Use the Email field type

    In your form plugin (Contact Form 7, WPForms, Gravity Forms, Fluent Forms and others), make sure the field is the Email type, not Single Line Text.

  2. Contact Form 7

    Use the tag [email* your-email]. The asterisk makes it required and it is checked on the server too.

  3. Check custom code

    If a theme or snippet removes validation or changes the field, remove or fix it.

Browser-side email fieldhtml
<label for="email">Email</label>
<input type="email" id="email" name="email" required
       autocomplete="email" maxlength="254"
       pattern="[^\s@]+@[^\s@]+\.[^\s@]{2,}">
Server-side check in PHPphp
<?php
$email = trim($_POST['email'] ?? '');

if (strlen($email) > 254 || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
    http_response_code(422);
    exit('Please enter a valid email address.');
}

// Also require a dot in the domain part.
$domain = substr(strrchr($email, '@'), 1);
if (strpos($domain, '.') === false) {
    http_response_code(422);
    exit('Please enter a valid email address.');
}
Form behaviour

Before

  • 'abc' is accepted
  • Thank-you page shows
  • CRM gets an unreachable contact
  • Autoresponder bounces

After

  • 'abc' shows a clear error
  • Visitor corrects the address
  • CRM gets a reachable lead
  • Autoresponder is delivered
Email validation on or offInteractive
Email validation missing

Phone number * required

Visitors who start the form and send it (example)

42% send it · example numbers

Invalid addresses are accepted, so some submissions are leads you can never contact.

Toggle to see the effect of missing email validation on submissions.

How to confirm it's fixed

Confirm the fix
  1. Repeat the bad inputs

    Try each entry from the checklist above. Each should show an error and not reach the thank-you page.

  2. Test a valid address

    Submit a real test address with a plus sign, such as you+test@yourdomain.com. It should succeed.

  3. Test without JavaScript

    Post the form directly with curl or similar and a bad email. The server should respond with an error.

  4. Check the destination

    Confirm the good test lead arrives in your inbox and CRM, and no record exists for the bad ones.

How to prevent it happening again

Keep validation working
  • Re-run the bad-email test after any form plugin, theme or builder update
  • Re-run it after you redesign or replace a form
  • Keep server-side validation even when the front end has it
  • Avoid custom scripts that remove or override built-in checks
  • Review recent CRM entries monthly for obvious junk addresses
  • Offer a typo hint for common domains instead of strict blocking

How FunnelGuard handles this

FunnelGuard detects this issue today through validation check journeys. A robot visitor opens your form on a schedule, enters an obviously invalid email and checks whether the form accepts it. If the form lets the bad value through, that is flagged as a failure.

A failure is re-checked from a second region before one alert goes out, with a screenshot and a likely cause. Alerts can go to email, Slack, Teams, WhatsApp, a webhook or PagerDuty. Test traffic is marked (utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent), so you can filter it out of your reports. The Free plan covers 1 site and 2 journeys with daily checks and no card, and paid plans include a 3-day free trial.

Questions people ask

Why does my form accept invalid email addresses?

Usually the field is a plain text box instead of an email field, validation is switched off in the form settings, or a custom script overrides the check. It can also happen when only the browser checks the value and the server accepts anything it receives.

How do I validate an email address on a contact form?

Use an input type="email" with the required attribute for the browser check, then validate the address again on the server. In PHP, filter_var($email, FILTER_VALIDATE_EMAIL) is a simple option. Show a clear error message if the check fails.

Is HTML5 email validation enough?

No. It only checks the basic shape, and it accepts values like a@b. It can also be skipped by bots or direct posts to the form address, so you need a server-side check as well.

Should I verify that an email address actually exists?

Format checks catch obvious errors but cannot prove a mailbox exists. For that, send a confirmation email or use a double opt-in link. For most lead forms, a good format check plus a typo hint is enough.

Why do I get fake emails like test@test.com in my leads?

Some visitors enter junk to get past the form, and bots fill fields with random values. Stronger validation and spam protection reduce these entries, but they will not remove every one.

Can strict email validation lose me real leads?

Yes, if the rule is too strict. Patterns that reject plus signs, long domain endings or new domains turn away real people. Keep the rule simple and use a suggestion for likely typos.

How can I test email validation on my form automatically?

Submit known bad values on a schedule and check that the form refuses them. FunnelGuard does this with validation check journeys and alerts you if a bad email gets through.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Validation check journeys.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.