some modifications
added setCustomValidity("");