Skip to content

Instantly share code, notes, and snippets.

@goofmint
Created November 20, 2017 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goofmint/1bee56bc8ccdd9a424d7beaf7daa7d29 to your computer and use it in GitHub Desktop.
Save goofmint/1bee56bc8ccdd9a424d7beaf7daa7d29 to your computer and use it in GitHub Desktop.
var mail = document.getElementById("email_addr_repeat");
mail.addEventListener("input", function() {
if (this.value != document.getElementById('email_addr').value) {
this.setCustomValidity('確認入力されたメールアドレスが異なります');
} else {
// input is valid -- reset the error message
this.setCustomValidity('');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment