Skip to content
Browse files

Merge pull request #34 from aaccioly/master

Numeric: onblur callback function is not being called for inputs that contains numbers such as 123a123
  • Loading branch information...
2 parents 0a5ee8e + 72335dc commit 1bbbda7d7e514946a89c7074e28ce7c340b2f911 @SamWM committed Apr 2, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 numeric/jquery.numeric.js
View
4 numeric/jquery.numeric.js
@@ -228,7 +228,7 @@ $.fn.numeric.blur = function()
var val = this.value;
if(val != "")
{
- var re = new RegExp("^\\d+$|\\d*" + decimal + "\\d+");
+ var re = new RegExp("^\\d+$|^\\d*" + decimal + "\\d+$");
if(!re.exec(val))
{
callback.apply(this);
@@ -277,4 +277,4 @@ $.fn.setSelection = function(o, p)
}
}
-})(jQuery);
+})(jQuery);

0 comments on commit 1bbbda7

Please sign in to comment.
Something went wrong with that request. Please try again.