# Help me use my own messages for form field validation instead of browsers’

**URL:** <https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798>\
**Category:** HivePress\
**Tags:** code\
**Created:** [June 30, 2026, 6:17pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798 "2026-06-30T18:17:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hamid](https://community.hivepress.io/letter_avatar_proxy/v4/letter/h/5fc32e/32.png) [@hamid](https://community.hivepress.io/u/hamid)\
**Post date:** [June 30, 2026, 6:17pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/1 "2026-06-30T18:17:38Z")

</div>

As I checked, when submitting a new Listing or updating one, **Firefox doesn’t show the messages of fields validation on Android phones**!

So I want to completely **disable browser validation of form fields** and **use my own messages** instead (especially in other languages than English).

I searched a lot on the Internet and found somethings, but as I’m not professional enough in web programming, I confused somehow! I found that we can do this by adding ‘novalidate’ property to Html froms and using some Javascript functions like setCustomValidity!

But I don’t know if I should modify Hivepress codes directly or if there are some better and more standard ways!

Unfortunately, I couldn’t understand either **what I can with hivepress actions and filters as well as functions like add\_filter!**

So please explain to me in easy words that how I can customize the way of showing filed validation messages to users?

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [July 1, 2026, 9:13pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/4 "2026-07-01T21:13:48Z")

</div>

Hi,

Unfortunately, there is no simple solution for this, in that case you would need to implement a fully custom solution using JavaScript.

Could you please clarify which browser and version you are using, as well as the Android version? Form input validation is a standard browser feature, so this information will help us better understand the issue.

For example, if a field has the `required` attribute, the browser should automatically highlight it and show a validation message when the user tries to submit the form without filling it in. This is part of standard HTML form behavior across modern browsers.

---

<div class="post-metadata">

**Author:** ![hamid](https://community.hivepress.io/letter_avatar_proxy/v4/letter/h/5fc32e/32.png) [@hamid](https://community.hivepress.io/u/hamid)\
**Post date:** [July 2, 2026, 5:01pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/5 "2026-07-02T17:01:42Z")

</div>

Thanks for your answer, Kseniia

Regarding the problem I faced in Firefox, I tested it under **Android ver. 11 with the latest versions of Firefox (ver. 152), Chrome (ver. 149) and Opera (ver. 99)** and the result was:

Chrome and Opera: work fine (show error messages like: Please fill out this field!)

Firefox: **shows nothing** and pressing the submit button has no effect!

And regarding my main request, using my own messages instead of the browsers’, I could find a relatively simple solution that is adding a short piece of code to class-form.php file (in includes/form path):

**$attributes[‘novalidate’] = ‘novalidate’;**

This attribute disables browser’s field validation and so the internal hivepress validation would be used instead (it shows the messages on the top of the page in a grey-colored box). Consequently, I can translate the notification messages into my own ones through Loco Translate plugin!

As hivepress has a field validation solution by itself, **I think this solution must be active by default or at least I think there must be a simple way to switch to** this solution. I think there must be a setting in the WordPress admin panel or somewhere else for this!

**I couldn’t find such setting** , so if there is someone professional, especially from the hivepress core team, they can help in this way.

Note: I found one other topic related to this case, although it was not answered correctly either: [Translating field validation errors](https://community.hivepress.io/t/translating-field-validation-errors/4225)

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [July 3, 2026, 3:12pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/8 "2026-07-03T15:12:06Z")

</div>

Thanks for the details.

If the attribute is not validating, you can try using the following filter:

```php
add_filter(
	'hivepress/v1/fields/field',
	function( $args ) {
		$args['attributes']['novalidate'] = 'novalidate';
		return $args;
	}
);

```

Please note that this hook applies to all fields globally, and it may not work for every field type depending on how the form is rendered.

---

<div class="post-metadata">

**Author:** ![hamid](https://community.hivepress.io/letter_avatar_proxy/v4/letter/h/5fc32e/32.png) [@hamid](https://community.hivepress.io/u/hamid)\
**Post date:** [July 5, 2026, 12:40pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/9 "2026-07-05T12:40:15Z")

</div>

Thanks for your help.

Although I think the code below seems better:

> add\_filter(
> 
> ```
> 'hivepress/v1/forms/form',
> 
> function( $args ) {
> 
> $args\['attributes'\]\['novalidate'\] = 'novalidate’;
> 
> return $args;
> 
> }
> 
> ```
> 
> );

But anyway, let me know if there is any way to select a specific form, filed or attribute using their names or types inside the codes above, so we can customize a specific field or attribute individually?

Actually I want to set a specific CSS/HTML id for some attributes so I can modify their viewing styles in my CSS codes.

So, how can we

---

<div class="post-metadata">

**Author:** ![kseniia](https://community.hivepress.io/user_avatar/community.hivepress.io/kseniia/32/13513_2.png) [@kseniia](https://community.hivepress.io/u/kseniia)\
**Post date:** [July 6, 2026, 3:27pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/12 "2026-07-06T15:27:05Z")

</div>

If your code is working, then that’s fine.

You can also try to access the form fields directly. For example, if you use the hook `hivepress/v1/forms/listing_update` (for the listing form), you can modify specific fields like this:

```auto
$form['fields']['title']['attributes']['novalidate'] = 'novalidate';

```

Hope this helps

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [August 5, 2026, 3:27pm UTC](https://community.hivepress.io/t/help-me-use-my-own-messages-for-form-field-validation-instead-of-browsers/17798/13 "2026-08-05T15:27:48Z")

</div>

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