<script>

var forms = document.getElementsByTagName('form');

for (var i = 0; i < forms.length; i++) {

    forms[i].noValidate = true;



    forms[i].addEventListener('submit', function(event) {

        //Prevent submission if checkValidity on the form returns false.

        if (!event.target.checkValidity()) {

            event.preventDefault();

            //Implement you own means of displaying error messages to the user here.

			alert("All fields are required");

			var inputs = document.querySelectorAll('input[type=text]');

    for (var i = 0; i < inputs.length; i++) {

        inputs[i].addEventListener('blur', function(event) {

            event.target.classList.add('interacted');

        }, false);

    }

			

        }

    }, false);

}





</script>