-1

I made a simple form using Bootstrap 4. I thought the built-in validator in BS4 could be usefull.

I made an simple email form field:

<label for="email">E-mail cím:</label><br>
<input type="email" name="email" class="inputText"><br>

My problem is that, when I type a false adress, It comes back with english text. But I want to make a hungarian site.

Do you have any idea where can I change this text? I Googled It for an hour and haven't found anything.

Screenshot

Thanks Gergo

1 Answers1

0

Taken from How can I change or remove HTML5 form validation default error messages?.

To set a custom message to your validator error input, use something like

 <input type="email"
    oninvalid="setCustomValidity('Invalid email!')"
    onchange="try{setCustomValidity('')}catch(e){}" />

There is also a change you did not set the locale (language) of the page.

Do this by adding the lang attribute to your <html> tag, like:

<html lang="hu">
  ...
</html>
Community
  • 1
  • 1
Hidde
  • 11,493
  • 8
  • 43
  • 68