Change the default error messages for HTML5 inputs using jquery
Do let me know your thoughts through comments or through mail [email protected]
Have a good day !
Change the default error messages for HTML5 inputs using jquery
Do let me know your thoughts through comments or through mail [email protected]
Have a good day !
$(document).on('change', 'input[type="number"]', function(){ | |
if (Boolean($(this)[0].checkValidity) && (! $(this)[0].checkValidity())) { | |
if($(this)[0].validity.rangeOverflow) { | |
$(this)[0].setCustomValidity('Out of stock count!') | |
} | |
} | |
}) |