function CheckNewStudent(idNumber) { if (idNumber.toString().length == 9) { //continue... } $scope.data.matchingStudent = null; }
var idNumber = parseInt(newval); //...some code in between that caused me to not notice this before... CheckNewStudent(idNumber);
idNumber < 1e9