An error has occurred

{{terminalError}}

Get all of the action from the 2023 Rugby World Cup, in your inbox

Thanks for subscribing!

You're on the list to get updates from the 2023 Rugby World Cup.

var emailForm = document.querySelector(".pn-template__email-wrapper"); var userEmailInput = document.querySelector(".pn-template__email"); var emailError = document.querySelector(".pn-template__error"); var userSubmit = document.querySelector("#submit-button"); var userFakeSubmit = document.querySelector("#fake-button"); var errorIcon = document.querySelector("#error-icon"); var checkEmail = function (inputData) { var regex = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; return regex.test(inputData); }; userEmailInput.addEventListener("input", function () { emailForm.classList.remove("pn-newsletter__email-wrapper--bad"); emailError.innerText = ""; errorIcon.style.display = "none"; if (checkEmail(userEmailInput.value)) { userFakeSubmit.hidden = true; userSubmit.hidden = false; } else { userSubmit.hidden = true; userFakeSubmit.hidden = false; } }); userFakeSubmit.addEventListener("click", function () { if (!checkEmail(userEmailInput.value)) { emailForm.classList.add("pn-newsletter__email-wrapper--bad"); errorIcon.style.display = "block"; userEmailInput.focus(); if (userEmailInput.value === "") { emailError.innerText = "Please enter a valid email address"; } else { emailError.innerText = "Please enter a valid email address"; } } else { emailForm.classList.remove("pn-newsletter__email-wrapper--bad"); emailError.innerText = ""; errorIcon.style.display = "none"; } });