     # 44 is ',', 45 is '-', 57 is '9' and 47 is '/'
     isNotDigit = (which) ->
         (which < 44 || which > 57 || which is 47)
+
+    isTooLong = (valLength, maxDigits) ->
+      valLength >= maxDigits
 
     controlKeys = [0,8,13] # 0 = tab, 8 = backspace , 13 = enter
     isNotControlKey = (which) ->


    defaultOptions = fcsaNumberConfig.defaultOptions

    getOptions = (scope) ->
        options = angular.copy defaultOptions
        if scope.options?
            for own option, value of scope.$eval(scope.options)
                options[option] = value
        options
    

        scope:
          true
        link: (scope, elem, attrs, ngModelCtrl) ->
            options = getOptions scope, attrs
            isValid = makeIsValid options

            ngModelCtrl.$parsers.unshift (viewVal) ->
