ll American phone number separated by dashes is required.'))

		function clearErrors(e) {
			var regex = new RegExp(e.target.pattern);
			if (regex.test(e.target.value)) {
				e.target.setCustomValidity('');
			}
			else {
				e.target.checkValidity();
			}
		}

		document.forms.tele.name.addEventListener('input', clearErrors);
		document.forms.tele.phone.addEventListener('input', clearErrors);
	</script>
</body>
</html>
