# Editing a validation message in Hubspot

**URL:** <https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761>\
**Category:** CMS Development\
**Created:** [June 16, 2020, 3:50pm UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761 "2020-06-16T15:50:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jools619](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jools619/32/87988_2.png) [@Jools619](https://community.hubspot.com/u/Jools619)\
**Post date:** [June 16, 2020, 3:50pm UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761/1 "2020-06-16T15:50:07Z")

</div>

Hi

Ive put together a page using Drag and Drop in the Design tools and dropped in a hubspot form.

I need to change the validation message on the email field which currently says:

**Please enter your business email address. This form does not accept addresses from [gmail.com](http://gmail.com).**

Ive looked at the developer docs about this and it looks like i need to add something like:

```auto
translations: {
 en: {
 forbiddenEmailDomain: "Please enter your business email address"
 }
 }

```

I have a .js file attached to this page I created, so do I literally need to add the above code into that?

Any info much appreciated

Thanks

Jools

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [June 16, 2020, 5:44pm UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761/2 "2020-06-16T17:44:47Z")

</div>

@Jools619 you would need use the javascript form embed and then add your translations into the options into that. It would look something like this:

```auto
<script><!--[if lte IE 8]><script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script><![endif]--><script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script><script>
hbspt.forms.create({
 portalId: '123456',
 formId: '123456',
 locale: 'en',
 translations: {
 en: { forbiddenEmailDomain: "Please enter your business email address" }
 }
});
</script>

```

---

<div class="post-metadata">

**Author:** ![Jools619](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jools619/32/87988_2.png) [@Jools619](https://community.hubspot.com/u/Jools619)\
**Post date:** [June 17, 2020, 8:19am UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761/3 "2020-06-17T08:19:03Z")

</div>

Thanks @stefen  
Yes that worked - I just needed to add a HTML block with that code snippet into the Drag and Drop template

---

<div class="post-metadata">

**Author:** ![BPollastrini](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BPollastrini](https://community.hubspot.com/u/BPollastrini)\
**Post date:** [April 17, 2023, 11:58am UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761/4 "2023-04-17T11:58:46Z")

</div>

I am no developer, how would I add this code snippet to the form? Do I need to do it for all forms, pelase?

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [April 17, 2023, 6:05pm UTC](https://community.hubspot.com/t/editing-a-validation-message-in-hubspot/21761/5 "2023-04-17T18:05:47Z")

</div>

You add this into an HTML area. This will embed the form on the page with said customizations. In other words, you use this embed code instead of the Form Module or Block.
