Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Name field rejecting accents or special characters: how to fix it

CNV-026Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Your form shows an error such as "Please enter a valid name" when a visitor types a name with an accent (é, ü, ñ), an apostrophe (O'Brien), a hyphen (Smith-Jones), a space, or letters outside the Latin alphabet (Chinese, Arabic, Cyrillic). The visitor did nothing wrong. The form's rule just did not expect their name.

A typical culprit is a pattern like ^[A-Za-z]+$. It matches only 26 unaccented letters. No spaces, no accents, no apostrophes. A related fault is silent: the form accepts the name but the database or CRM stores it as José or Zo?. That is an encoding problem, and it needs a different fix (see below).

Why it costs you leads or sales

People with accented or non-English names are told their own name is invalid. Many give up. Others type a fake or stripped version (Jose instead of José), which hurts personalisation, email greetings and CRM matching. The loss is hardest to notice because rejected visitors never show up in your lead list. You only see a slightly lower form completion rate, mostly in markets with many such names.

Where the lead is lost
  1. Ad or search clickVisitor lands on the page
  2. Fills the formTypes "Zoë O'Brien"
  3. Name validationPattern allows only A-Z
  4. SubmissionNever sent
  5. CRM leadNever created

The visitor does everything right until the name validation rejects their name.

Submission rate by name typeExample numbers
Submission rate by name type (example)Plain names (Smith): 62 %; Hyphen or apostrophe: 20 %; Accented letters: 15 %; Non-Latin script: 5 %024486220155Plain names (Smith)Hyphen or apostropheAccented lettersNon-Latin script%

Example: illustrative numbers showing how a strict rule can depress completion for visitors with accented or hyphenated names.

How to check if your site has it

Test the form yourself with a set of realistic names. Use a test email address you control and mark the entries as tests so your sales team can ignore them.

Test names to try in the name field
Name to enterWhat it tests
José GarcíaAccents and a space
Zoë MüllerDiaeresis and umlaut
Sinéad O'BrienApostrophe (straight ')
Anne-Marie Smith-JonesHyphens
Nguyễn Thị HươngStacked Vietnamese diacritics
Łukasz ŻółćPolish letters
李小龍Chinese characters
محمد عليRight-to-left script
Run the check
  1. Submit each test name

    Fill the form with each name from the table and watch for inline errors or a blocked submit button.

  2. Check the thank-you page and email

    Confirm the form went through and the notification email shows the name correctly, not as garbled characters.

  3. Check the CRM or database

    Open the new lead record. Look for question marks, boxes or strings like é in place of accents.

  4. Inspect the rule if it fails

    Right-click the field, choose Inspect, and look for a pattern attribute on the input. Also search your theme or plugin scripts for regex such as [a-zA-Z].

How to fix it

The best rule is often no rule. Names are too varied to validate well. If you must validate, only require that the field is not empty and let people type any letters, spaces, hyphens and apostrophes.

Unicode-friendly name checkjavascript
// \p{L} = any letter in any language, \p{M} = accent marks
const nameOk = /^[\p{L}\p{M}][\p{L}\p{M}\s'’.-]*$/u;

console.log(nameOk.test("Zoë O'Brien")); // true
console.log(nameOk.test("Nguyễn Thị Hương")); // true
console.log(nameOk.test("Anne-Marie")); // true
HTML name input with no restrictive patternhtml
<label for="name">Full name</label>
<input type="text" id="name" name="name" autocomplete="name" required>
Fix by platform
  1. Check the form plugin's field settings

    In Contact Form 7, look at the name tag in the form editor and remove any custom pattern or validation add-on. In Gravity Forms, Ninja Forms, WPForms or Fluent Forms, open the Name field and remove input masks or custom validation.

  2. Search the theme and plugins for the rule

    Search your theme files and custom code snippets for a-zA-Z. Replace the pattern with the Unicode version above or delete it.

  3. Check the database collation

    If names save as garbled text, make sure the database tables and DB_CHARSET in wp-config.php use utf8mb4.

Name validation, before and after

Before

  • Pattern allows only A-Z
  • José, O'Brien and Nguyễn are rejected
  • Visitors leave or type fake names

After

  • Pattern allows any letter, space, hyphen and apostrophe
  • Real names are accepted
  • CRM stores names as typed

How to confirm it's fixed

Confirm the fix
  • Every name in the test table submits without an error
  • The thank-you page or success message appears
  • The notification email shows accents correctly
  • The CRM record shows the exact name typed
  • Test on mobile as well as desktop, since keyboards insert curly apostrophes (’)
  • Test in a second browser to rule out cached scripts

How to prevent it happening again

Prevention habits
  • Keep a standard list of test names and use it whenever you build or edit a form
  • Avoid pattern rules on name fields unless there is a clear need
  • Make sure front-end and back-end validation agree
  • Re-test after plugin, theme or form tool updates
  • Use utf8mb4 and UTF-8 for every new database and integration
  • Accept both straight (') and curly (’) apostrophes

How FunnelGuard handles this

FunnelGuard does not check this yet. Testing names with accents and special characters is a possible future check, but today it is not part of what FunnelGuard runs.

What FunnelGuard does do is run your real lead form journey on a schedule with a robot visitor. It checks each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a form breaks outright, a failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause. That would not reveal a rule that rejects only certain names, because the test uses its own standard test data.

To watch for this yourself, rerun the test-name table after any form change, and compare form starts with submissions in GA4 or your form tool's reports. Look for validation errors in the form tool's logs if it provides them. Ask your sales team to tell you when a lead's name looks garbled or stripped of accents.

Frequently asked questions

Questions people ask

Why is my form rejecting names with accents?

The name field probably has a validation rule that allows only the letters A-Z. It can be a pattern attribute, a plugin setting, a theme script or a server-side regex. Replace it with a rule that accepts Unicode letters, or remove it.

How do I allow apostrophes and hyphens in a name field?

Use a pattern that permits them, such as ^[\p{L}\p{M}][\p{L}\p{M}\s'’.-]*$ with the u flag in JavaScript. Allow both the straight apostrophe (') and the curly one (’), because phone keyboards often insert the curly version.

What regex should I use to validate a name?

The safest option is to only require that the field is not empty. If you need a rule, use Unicode property escapes like \p{L} for letters and \p{M} for accent marks, plus spaces, hyphens, apostrophes and full stops. Avoid [A-Za-z] because it excludes most of the world's names.

Why do accented names show up as question marks or é in my CRM?

That is a character encoding mismatch, not a validation rule. Somewhere between the form, the server, the database and the CRM, text is not handled as UTF-8. Use UTF-8 on pages and utf8mb4 in MySQL, and check any integration that passes the data along.

Should I validate names at all?

Usually minimal validation is best. Real names can be short, long, hyphenated, one word or in any script, so strict rules reject valid people. Requiring a non-empty value and relying on spam protection is safer than blocking characters.

How can I test whether my contact form accepts international names?

Submit a set of test names such as José García, Sinéad O'Brien, Anne-Marie Smith-Jones, Nguyễn Thị Hương and 李小龍. Check that each one submits, appears correctly in the notification email and is stored properly in your CRM.

Does FunnelGuard check for names with special characters being rejected?

No. FunnelGuard does not check this yet, though it is a possible future check. It does run your real form journey on a schedule and checks steps, tracking and whether test leads arrive, so it would catch a form that fails outright.

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.

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.