Form validation errors – how to translate them to your language

Last updated: August 7, 2020 Written by: Avatar Teresa
share
Table of contents
share
Table of contents

You can translate form validation errors to every language and change their message by using a Javascript code.

Form validation errors

1. In the platform, go to the Dashboard -> Javascript codes tab of the chosen landing page, add a new script and paste the code presented below in the body bottom of the main page.

<script> 
  registerValidateCallback(function (html) { 
    return html.replace(/Required/g, 'Translation here').replace(/This isn't an email/g, 'Translation here').replace(/This isn't a phone number/g, 'Translation here') 
  }); 
</script>
Form validation errors

Instead of  ‘translation here’ enter your own error message that will appear if the user incorrectly completes the form.

share

Was this manual helpful?