         # - the capture is different to the value
         # - AND there is no '.' present after the capture
         # - OR there is no more than one '.' present
-        if ((@val != num) && (@val != num + '.')) || ( @occurrances(@val) > @allowedDecimals)
+        val = @getVal()
+        if ((val != num) && (val != num + '.')) || ( @occurrances(val) > @allowedDecimals)
           @setVal( num )
+
+      # Assume the input is empty and so set the value if it doesn't match the regex
+      else
+        @setVal( "" )
 
     # Simple function to check how many times
     # a decimal appears in a string

      @$el.off 'input propertychange'

    getVal: =>
      @val = @$el.val()

    setVal: (value) =>
      @$el.val( value )


      return regex

    extractNumbers: (val) =>
      matched = val.match( @buildRegex() )
      if matched != "" && matched != null
        return matched

    process: =>
      # Set the current value so we can access it anywhere
      # without having to read it all the time
      extr = @extractNumbers( @getVal() )
      console.log extr

      # If there are captured numbers
      if extr
