Modifying Form Validation Error Messages


Modifying Form Validation Error Messages

When a visitor fills out the form on your page but their form entry doesn't validate, they'll see some errors, which look like this by default:



You can modify and customize the wording of these errors by adding a snippet of Javascript to your landing page. Here's the script:

To add it to your page, click Javascripts javascriptsbutton.png button in the bottom left of the Page Builder, set Placement to Before Body End Tag, and then paste the script in. 

To customize your form validation error messages, amend the values after the = sign to whatever you'd like your new message to read. 

Here's the result:







Using .email or .phone rather than .required will display only when the email field or phone number field doesn't have the correct input. If you would like the validation to be shown even when the field is empty, you'll need to add both the .email/.phone and the .required custom code to your page.
Unbounce made it easy for me to find the information I need.
Strongly DisagreeDisagreeSomewhat DisagreeUndecidedSomewhat AgreeAgreeStrongly Agree

Measuring Customer Effort Score with Nicereply