Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Name field rejects accents or apostrophes: how to fix it

PRF-363Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A name field rejects input that is perfectly valid. The cause is usually a validation rule, called a pattern or regex (a short code that describes allowed characters), such as ^[A-Za-z ]+$. That rule allows only English letters and spaces.

Names that fail include José, Müller, Zoë, O'Brien, D'Angelo, Anne-Marie, Nguyễn, Мария, محمد and 李明. The rule can live in the browser (HTML or JavaScript), on the server, or in a form plugin or a CRM field setting.

Why it costs you leads or sales

The visitor is ready to give you their details and your form tells them their own name is wrong. Many will not try again. They cannot fix the problem, because the only way to pass is to misspell their name.

Some people strip accents to get through. Then your emails, invoices and sales calls carry a wrong name. Others abandon the form. You never see those lost leads, because nothing reaches your inbox or CRM.

Form completion by name typeExample numbers
Form completion by name type (example)Plain Latin names: 90 % completed; Names with accents: 55 % completed; Names with apostrophes: 50 % completed; Non-Latin scripts: 20 % completed0346990555020Plain Latin namesNames with accentsNames with apostrophesNon-Latin scripts% completed

Example: illustrative numbers showing how a strict name rule can hurt completion for visitors whose names contain accents or apostrophes. Not real data.

A valid name is rejected

The visitor types a real name, the validation rejects it, and the lead is lost.

How to check if your site has it

Submit your own form with a set of real-world names. Do it in a normal browser window and watch for an error message, a blocked submit button, or a form that submits but loses characters.

Test names to paste into your first and last name fieldstext
José
Müller
Zoë
O'Brien
D’Angelo (curly apostrophe)
Anne-Marie
Nguyễn
Mc Donald
Мария
李明
محمد
Γιώργος
What to look for on each test
  • The form shows no error and submits.
  • The thank-you page or confirmation appears.
  • The notification email shows the name exactly as typed.
  • The CRM or spreadsheet record shows the name with accents intact (no ? or odd symbols).
  • Both single and curly apostrophes work.
  • Names with a space or hyphen are accepted.

How to fix it

The best rule for a name field is almost no rule. Require that it is not empty, limit the length, and accept any letter. Do not try to guess what a valid name looks like.

Fix name validation
  1. Find where the rule lives

    Look for a pattern attribute on the input, JavaScript validation, a form plugin setting, and any server-side check. Fix every layer, or the strictest one still blocks people.

  2. Replace the allowed-characters rule

    Use a Unicode-aware pattern that accepts letters from any script, plus spaces, apostrophes, hyphens and full stops. Or remove the pattern entirely.

  3. Allow a sensible length

    Set a minimum of 1 and a maximum of around 100 characters. Some people have one name only, so do not force a separate last name unless you truly need it.

  4. Check storage and email

    Make sure your database, CRM and email templates use UTF-8 so accents and other scripts are saved and shown correctly.

  5. Retest with the sample names

    Submit each test name and check the notification and CRM record.

Unicode-aware pattern for an HTML name inputhtml
<input type="text" name="first_name" autocomplete="given-name"
  required maxlength="100"
  pattern="[\p{L}\p{M}' ’.\-]+" />
<!-- In current browsers the pattern attribute is compiled with the "v" flag, so inside a class the hyphen must be escaped (\-), as above. -->
Same rule in JavaScriptjavascript
const nameOk = (value) =>
  value.trim().length > 0 &&
  value.length <= 100 &&
  /^[\p{L}\p{M}' ’.\-\s]+$/u.test(value);

nameOk("O'Brien"); // true
nameOk('李明');       // true
nameOk('José');      // true
Same rule on the server in PHPphp
<?php
$name = trim($_POST['first_name'] ?? '');
$valid = $name !== ''
  && mb_strlen($name, 'UTF-8') <= 100
  && preg_match('/^[\p{L}\p{M}\' ’.\-]+$/u', $name);
Where to change it on your platform
  1. Check your form plugin

    In Contact Form 7, look at the field tag (for example [text* your-name]) and any custom validation code in your theme. In Gravity Forms, Fluent Forms or WPForms, open the field settings and remove any custom validation or regex. Plugin text fields normally accept Unicode by default.

  2. Search custom code

    Search your theme and plugins for A-Za-z or ctype_alpha, which are common causes. Replace them with the Unicode patterns above.

Name validation before and after

Before

  • Pattern allows only A-Z and a-z.
  • José, O'Brien and 李明 show an error.
  • Visitors leave or change their name.

After

  • Pattern accepts any letter, mark, apostrophe and hyphen.
  • All test names submit.
  • Names reach the CRM exactly as typed.

How to confirm it's fixed

Confirm the fix
  1. Resubmit each test name

    Use the sample list in a fresh browser window, on both desktop and mobile.

  2. Check the inbox

    Confirm the notification email shows the name correctly.

  3. Check the CRM

    Open the new record and confirm accents and non-Latin characters are intact.

  4. Delete test entries

    Remove the test leads so they do not enter your sales follow-up.

How to prevent it happening again

Prevention checklist
  • Never use A-Z-only patterns for names.
  • Add the sample names to your form test routine for every new form.
  • Retest forms after plugin, theme or form builder updates.
  • Keep UTF-8 everywhere: page, database, CRM and email.
  • Ask developers and agencies not to add name regex without a review.
  • Use one full name field if you do not need first and last separately.

How FunnelGuard handles this

FunnelGuard does not check this yet. Testing name fields with accents, apostrophes and non-Latin scripts is a possible future check, not a current feature.

What FunnelGuard does today is run your real lead form journey on a schedule from the EU or the US, check each step, and confirm that a test lead reaches your inbox and CRM. If a form breaks outright, for example the submit fails or the email never arrives, a failure is re-checked from a second region and you get one alert with a screenshot and a likely cause. It does not test for rejected names specifically.

To watch for this issue yourself, add the sample names to a manual test every time you change a form, and review your form tool's error or abandonment reports for spikes on the name field. A free read-only website audit and a Free plan (1 site, 2 journeys, daily checks, no card) are available if you want monitoring of the wider form journey.

Questions people ask

Why does my form say my name is invalid?

The form probably uses a validation rule that only allows plain A-Z letters. Names with accents, apostrophes, hyphens or non-Latin characters then fail. Loosen the rule to accept any Unicode letter, or remove the pattern.

How do I allow apostrophes in a name field?

Add the apostrophe to the allowed characters, and include the curly version (’) as well as the straight one ('). A pattern such as [\p{L}\p{M}' ’.\-]+ with the Unicode flag allows letters, accents, apostrophes, spaces, full stops and hyphens.

What is the best regex for validating names?

Usually none. Names are too varied to validate by pattern. Require the field to be non-empty, cap the length at about 100 characters, and accept any Unicode letter. Strict rules reject real customers.

Why do accented characters turn into question marks after I submit a form?

That is an encoding problem, not validation. Your page, database or CRM is not using UTF-8, so characters like é are lost or garbled. Set UTF-8 (for example utf8mb4 in MySQL) at every step.

Should I make last name required?

Only if you truly need it. Some people have a single name, and a forced last name field can push them to type filler text. A single full name field is often simpler and avoids splitting names wrongly.

How do I test a form with non-English names?

Submit it with a list of names such as José, Müller, O'Brien, Nguyễn, Мария and 李明. Check that the form accepts them, then confirm the email and CRM record show them correctly.

Does FunnelGuard check if my form rejects accented names?

No. This is not a current FunnelGuard check. FunnelGuard tests your form journey and whether test leads reach your inbox and CRM, but it does not try names with accents or non-Latin scripts, so test those by hand.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: intl_input_accepted on language / country variant runs (Stage 28): names with accents, apostrophes and non-Latin scripts per language.

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.