regex - How do I use a custom Tooltip Text for Invalid Input Pattern instead of "You must use this format: [blank]" -


when input not match pattern specified pattern attribute, firefox says, "please match requested format", okay; however, when validation fails internet explorer 10 displays "you must use format:" in tooltip nothing else. may simple, searching has not yielded me clue how supply text tooltip telling pattern should used.

example below 1 4 digit number:

<input id="institution_threshold_days" type="text" placeholder="0-9999" pattern="^[0-9]{1,4}$" /> 

try using title attribute describe want say:

<input id="institution_threshold_days" type="text" placeholder="0-9999" pattern="^[0-9]{1,4}$" title="please enter number less 10000." /> 

should work major browsers...

from microsoft

the content of title attribute both shown tooltip text field , appended generic pattern mismatch error message.

from mozilla

use title attribute describe pattern user.

and although cannot find official documentation, appears work in chrome well.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -