Skip to content

Commit

Permalink
v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelvanrijn committed Apr 1, 2016
1 parent 154989b commit c88280e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery-numeric_input",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/manuelvanrijn/jquery-numeric_input",
"authors": [
"Manuel van Rijn <[email protected]>"
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.numeric_input.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery Numeric Input - v0.2.0 - 2016-04-01
* jQuery Numeric Input - v0.2.1 - 2016-04-01
* https://github.com/manuelvanrijn/jquery-numeric_input
* Copyright (c) 2016 Manuel van Rijn
* Licensed MIT, GPL
Expand Down Expand Up @@ -118,7 +118,7 @@
parseValue: function( value ) {
var seperatorKey = '||SEP||';
var minusWasStripped = false;
var result = value.replace(/[A-Za-z$]/g, '');
var result = value.replace(/[^\d.,\-]/g, '');

if(result.length === 0 && this.options.allowEmpty) {
return '';
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.numeric_input.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.numeric_input",
"title": "jQuery Numeric Input",
"description": "Blocks all non numeric chars and helps with dot and comma input",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "https://github.com/manuelvanrijn/jquery-numeric_input",
"author": {
"name": "Manuel van Rijn",
Expand Down
2 changes: 1 addition & 1 deletion src/jquery.numeric_input.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
parseValue: function( value ) {
var seperatorKey = '||SEP||';
var minusWasStripped = false;
var result = value.replace(/[^\d.,-]/g, '');
var result = value.replace(/[^\d.,\-]/g, '');

if(result.length === 0 && this.options.allowEmpty) {
return '';
Expand Down
2 changes: 1 addition & 1 deletion test/jquery.numeric_input_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,6 @@

test('Weird past inputs', function() {
equal(this.numeric_input.parseValue('€ 46,34 '), '46#34');
})
});

}(jQuery));

0 comments on commit c88280e

Please sign in to comment.