1

I added max-length and I am getting this message in IE (Internet Explorer) but I didn't need that message it should only validate. I tried no-validate but it removes validation. I only want to remove this message from IE and it should validate. And on other browsers its working fine.

Any Help?

Gourav Sehgal
  • 31
  • 1
  • 9

1 Answers1

0

You can use following code :

$('input').on("invalid", function(e) {
    e.preventDefault();
});

It will prevent default behavior on invalid input for all input tag

OR

<input id="textBox1" type="text" maxlength="4" oninvalid="setCustomValidity(' ')">

Above code will set your validation message to blank.

Abhijeet
  • 4,069
  • 1
  • 22
  • 38