ISBN number validation for AngularJS