I'm very new to this and I can't figure out whats wrong with my school project. I think maybe my javascript file isn't linked correctly, or maybe the code is just broken?
// }
// Commented out above "}" - Edits must be at least 6 characters
function repost() {
var epost = document.getElementById('epost');
var repost = document.getElementById('repost');
if (epost.value != repost.value) {
repost.setCustomValidity('Epost adresserna måste matcha.');
} else {
// input is valid -- reset the error message
repost.setCustomValidity('');
}
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Skapa konto</title>
<link href="Stilmall.css" rel="stylesheet" type="text/css">
<script>var __adobewebfontsappname__="dreamweaver"</script>
<script src="http://use.edgefonts.net/abel:n4:default.js" type="text/javascript"></script>
<script src="reg.js" type="text/javascript"></script>
</head>
<body>
<div class="form1">
<form name="form2" id="form3" method="post" onsubmit="return validateForm();" action="tack.html">
<p class="form_text">
<input type="text" id="epost" placeholder="E-post" required>
<input type="text" id="repost" placeholder="Repetera E-post" required oninput="repost(this)">
</p>
<p class="form_text">
<input type="submit" id="sumbit" value="Registrera">
</p>
</form>
</div>
</body>
</html>