How to change warning text when pattern is used in input?
<input type="text" value="" pattern="(\d|(\d,\d{0,2}))" title="YOUR_WARNING_TEXT" >
The text shown can be defined in the title
attribute of the input
tag.
<input type="text" value="" pattern="(\d|(\d,\d{0,2}))" oninvalid="this.setCustomValidity('ERROR_TEXT')" oninput="this.setCustomValidity('')"/>
Try this code, corrected to clear after input...