On this page
What this issue is
Most forms check input twice. Client-side validation runs in the visitor's browser (HTML attributes like required and pattern, or JavaScript). Server-side validation runs on your server, CRM or form service after the data is sent. The two sets of rules are written separately, so they drift apart.
Why it costs you leads or sales
The visitor did everything right as far as they can tell. If the server rejects the entry and the page shows a vague error, a spinner that never ends or even a fake thank-you message, they leave. They rarely try again. You never see the lead, and your ad platforms may still record a conversion if the tracking fires on button click rather than on a real success.
- Visitor fills formEnters a phone like (555) 010 999
- Browser check passesClient rule allows spaces and brackets
- Server rejectsServer rule wants digits only, returns 422
- Lead saved in CRMNever created
- Notification and conversionNever sent
The browser accepts the entry, the server refuses it, and everything after is lost.
Example: share of 100 real submissions rejected by the server after passing the browser check. Your numbers will differ.
How to check if your site has it
List every field and its rules
For each field write down the client rule (HTML attributes, JavaScript) and the server rule (form plugin settings, CRM field type, backend code or API docs).
Open DevTools on the Network tab
Submit the form and look at the request. A 400, 422 or an error body in the response means the server refused it.
Try realistic edge cases
Use a phone with spaces, dashes and a country code, an email with a plus sign, a name with an apostrophe or accent, a long message, and a postcode with a space.
Check what the visitor sees
Note whether the page shows a clear error, nothing, or a false success message.
Compare with your CRM
Confirm each test submission that looked successful really arrived in the inbox and CRM.
| Field | Browser allows | Server may refuse |
|---|---|---|
| Phone | Spaces, brackets, + prefix | Anything but digits |
| name+tag@domain.com, new TLDs | Plus sign or long TLD | |
| Name | Apostrophes, accents, any length | Letters only or short max length |
| Message | Unlimited text | Max length such as 500 characters |
| Dropdown | Old option still in the page | Value no longer in the allowed list |
How to fix it
The principle: the server is the source of truth. Make the browser rules match it, or loosen the server rules so valid entries are accepted. Then make sure any server error is shown clearly on the page.
Check the form plugin's field settings
In plugins such as Contact Form 7, Gravity Forms or WPForms, open the field and compare its validation or input mask with any custom JavaScript or theme code on the page.
Remove duplicate rules
If a theme or snippet adds its own
patternor script check, delete it so the plugin's rules are the only ones.Show server errors
Make sure the plugin's error messages are enabled and not hidden by theme CSS.
Review theme form code
In the theme editor open the contact or custom form section and check
patternandrequiredattributes against what Shopify accepts.Display form errors
Make sure the form renders
form.errorsso rejected entries show a message.
Check field types
Use the correct field type (Email, Phone) and avoid custom code that adds extra patterns.
Review the failure message
Edit the form's Error state so it tells visitors what to fix instead of a generic message.
Check form field settings
Open the form builder and compare phone and email field settings with any custom code added to the page.
Test with real formats
Submit entries with spaces and country codes and confirm the contact appears in the CRM.
Check field validation
In the form settings review required fields and any Velo code that adds extra checks.
Align custom code
If Velo code validates input, make it match the rules of the connected collection or CRM.
Review form block settings
Check the field types in the form block and remove code injection that adds extra validation.
Check the storage connection
Confirm the connected storage (email, Mailchimp, Google Sheets) accepts the values you tested.
Share one rule definition
Define patterns and length limits once (for example in a shared config or schema) and use them in both browser and server code.
Return field-level errors
Have the server respond with 422 and a JSON list of errors per field, and render them next to the fields.
const res = await fetch(form.action, { method: 'POST', body: new FormData(form) });
if (!res.ok) {
const data = await res.json().catch(() => ({}));
const errors = data.errors || {};
Object.keys(errors).forEach((name) => {
const field = form.elements[name];
if (field) field.setCustomValidity(errors[name]);
});
form.reportValidity();
return;
}
showThankYou();Mismatched
- Browser accepts (555) 010 999
- Server accepts digits only
- Visitor sees a generic error or nothing
Aligned
- Both sides accept spaces, brackets and +
- Server strips formatting before saving
- Any rejection shows a clear message by the field
How to confirm it's fixed
- Submit every edge case from your table and see each one reach the inbox and CRM
- Network tab shows a success response, not 400 or 422
- A deliberately invalid entry shows a clear error next to the field
- The thank-you message appears only after the server accepts the entry
- Conversion tags fire only after a real success
How to prevent it happening again
- Keep one written list of field rules and update it whenever a form, plugin or CRM field changes
- Retest the form after any CRM, plugin or theme update
- Test with messy real-world data, not only clean sample entries
- Show server error messages on the page
- Schedule an automated end-to-end test of the form
Day 1
Form is built and tested with clean data. It works.
Week 4
CRM field is changed to digits only. Browser rules are untouched.
Week 5
Visitors who type spaces in the phone number are rejected. Nobody notices.
Week 8
Lead numbers look low. Someone finally checks the Network tab.
Phone number * required
Visitors who start the form and send it (example)
42% send it · example numbers
Entries with spaces pass the browser, the server rejects them and the lead is lost.
Toggle to compare a form with mismatched rules against one with aligned rules.
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor fills in and submits your form on a schedule, then checks for the success state. When the browser accepts the entry but the server refuses it, the success check fails after submit. A failure is re-checked from a second region, and then one alert goes out (email, Slack, Teams, WhatsApp, webhook or PagerDuty) with a screenshot and a likely cause.
Questions people ask
Why does my form pass validation in the browser but fail on the server?
The browser and the server each have their own rules, written separately. If the server is stricter, for example digits-only phone numbers, a value can pass the browser check and still be rejected after submit.
Why is my form submission returning a 422 error?
A 422 usually means the server understood the request but refused the data because it broke a rule. Open the response body in the browser's Network tab to see which field was rejected and why.
Do I need both client-side and server-side validation?
Yes. Client-side checks give visitors quick feedback, while server-side checks protect your data because browser checks can be skipped. They should follow the same rules.
How do I find which field the server is rejecting?
Submit the form with DevTools open on the Network tab and inspect the failed request's response. Many servers list the failing fields. If not, test one field at a time with realistic formats.
Why does my form show a thank-you message but no lead arrives?
The page may show success when the button is clicked rather than when the server accepts the data. Change it to show the message only after a successful response, and check the server's rules for the entries that failed.
How can I test form validation automatically?
Run an end-to-end test that submits the form with realistic data and checks for the success state and the lead in your inbox or CRM. FunnelGuard does this on a schedule and alerts you when the success check fails.
Should the server fix the data or reject it?
For harmless formatting, such as spaces in a phone number, it is better for the server to clean the value and accept it. Reject only data that is truly unusable, and always return a clear message.
Related issues
- CNV-029Valid email rejected (plus addressing, new TLDs)Fix guide
- CNV-031Required field can be left blank and the form still submitsFix guide
- CNV-032Validation error message not shown, form just does nothingFix guide
- CNV-035Phone validation rejects valid mobile numbersFix guide
- CNV-036Postcode/ZIP validation wrong for a countryFix guide
- CNV-042Error text is a raw code ('error 422')Fix guide