Search code examples
htmlmaxtooltiphint

Removing message box for max input in html i


The browser is adding a message about the maximum value allowed. How to remove this?

https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_max_min Reproduce: Type in the input value above max, keep the curser in the input, move the mouse outside, then inside the input, wait. You will get the message. How to remove it??

enter image description here


Solution

  • Use an empty title attribute on the input field. This maintains the form validation on submit.

    <input title="" type="number" id="quantity" name="quantity" min="1" max="5">