    checkValidity(target);
    }

    form.addEventListener('change', onCheckValidity);
    form.addEventListener('keydown', onCheckValidity);
    form.addEventListener('keyup', onCheckValidity);
    checkValidityAll();


    form.addEventListener('submit', (e) => {
      e.preventDefault();
      checkValidityAll();
    });

  </script>

</body>

</html>
