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

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