How to translate "This field is required" in the form node

Describe the problem/error/question

How can I translate error message “This field is required” in the form node? I can’t inject any javascript in the form. Any ideas?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: Cloud latest version
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

Hi @Uneerup

Since the form UI is rendered by n8n, injecting custom JavaScript to modify the message also isn’t supported. What I usually do in these cases is avoid relying on the built-in validation and instead handle the validation inside the workflow, where I can return a custom message in the desired language. If full localization is required, another option is using an external form and sending the data to n8n via a Webhook.

Hi @Uneerup Welcome!
On self hosted you can this work around where you set N8N_DEFAULT_LOCALE to your target language, also if the goal is to transform data you can do that after the form node using code node for more customization, as currently you cannot do much on n8n cloud. (Using custom webhooks and webpages with HTML node can work in this situation as @tamy.santos has suggested)

Hi all

Ok. Thanks for your inputs!

Hopefully the N8N team will take that into consideration when creating the next roadmap. :slight_smile:

Have a nice weekend. :slight_smile:

2 Likes

@Uneerup I’m really happy to hear this helped :blush:
If this solution solved the issue for you, please consider leaving a like or marking the reply as the solution ( it helps others find the answer more easily and also supports community contributors.)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.