File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1095,7 +1095,7 @@ $.extend($.validator, {
1095
1095
1096
1096
// http://docs.jquery.com/Plugins/Validation/Methods/number
1097
1097
number : function ( value , element ) {
1098
- return this . optional ( element ) || / ^ - ? (?: \d + | \d { 1 , 3 } (?: , \d { 3 } ) + ) (?: \. \d + ) ? $ / . test ( value ) ;
1098
+ return this . optional ( element ) || / ^ - ? (?: \d + | \d { 1 , 3 } (?: , \d { 3 } ) + ) ? (?: \. \d + ) ? $ / . test ( value ) ;
1099
1099
} ,
1100
1100
1101
1101
// http://docs.jquery.com/Plugins/Validation/Methods/digits
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ test("number", function() {
131
131
ok ( method ( "123.000" ) , "Valid decimal" ) ;
132
132
ok ( method ( "123,000.00" ) , "Valid decimal" ) ;
133
133
ok ( method ( "-123,000.00" ) , "Valid decimal" ) ;
134
+ ok ( method ( ".100" ) , "Valid decimal" ) ;
134
135
ok ( ! method ( "1230,000.00" ) , "Invalid decimal" ) ;
135
136
ok ( ! method ( "123.0.0,0" ) , "Invalid decimal" ) ;
136
137
ok ( ! method ( "x123" ) , "Invalid decimal" ) ;
You can’t perform that action at this time.
0 commit comments