Commit f78d6ab89391d7ee1be82761e494faa7d363c6b5
Committed by
GitHub
Merge pull request #292 from rijn/253
changed regular expression to fit exactly one zero
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/components/input-number/input-number.vue
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | const iconPrefixCls = 'ivu-icon'; |
35 | 35 | |
36 | 36 | function isValueNumber (value) { |
37 | - return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)/).test(value + ''); | |
37 | + return (/(^-?[0-9]+\.{1}\d+$)|(^-?[1-9][0-9]*$)|(^-?0{1}$)/).test(value + ''); | |
38 | 38 | } |
39 | 39 | function addNum (num1, num2) { |
40 | 40 | let sq1, sq2, m; | ... | ... |