why this simple javascript code didn't run properly http://codepen.io/anon/pen/wBXKQY html
<form id="scoreForm" name="scoreForm" onsubmit="validateForm();">
<label for="score">Score:</label>
<input id="score" name="score" />
<input type="submit" value="submit" />
</form>
js
function validateForm() {
var score = document.getElementById("score").value;
var scoreReg = /^\s*(\+|-)?\d+\s*$/;
if (score.match(scoreReg))
{ alert("the score pass"); return false; }
}
i just need to perform validation that is beyond the capabilities of the HTML5 input attributes.