Firefox Mobile Browser on Android does not display HTML Form Validation Errors Messages

858 Views Asked by At

The Firefox Mobile Browser (107.x on my mobile Android device) does not display html5-based form validation errors. It does work as expected on the desktop Firefox browser and it also works on Chrome on desktop and mobile.

Its easy to provide an example, since the examples on the related MDN page do also does not work on the mobile browser - they do work on desktop though:

https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation

There is also an example on bootstrap, that does not work on mobile regarding the validation error messages:

https://getbootstrap.com/docs/5.2/forms/validation/#browser-defaults

I already searched for errors that may be thrown in my code by using the Firefox usb-debugging mechanism. But there are no errors.

2

There are 2 best solutions below

0
On

Since no anwser came, i reported it to the developer team.

The problem is that the Firefox mobile browser actually does not support it yet (!):

https://bugzilla.mozilla.org/show_bug.cgi?id=1510450

0
On

Yeap! As you find out, the bug report was created in 2018.

I relied on a workaround based on css pseudo-class :user-invalid that works only on Firefox.

This way you could at least show a generic message error for Firefox Android.

I originally found this solution on Reddit.