Skip to content

Commit

Permalink
Avoid input starts with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan authored and JammingBen committed Mar 9, 2023
1 parent 8fcca6d commit 6eb6592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web-pkg/src/components/QuotaSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default {
},
isValueValidNumber(value) {
const optionIsNumberRegex = /^[0-9]\d*(([.,])\d+)?$/g
return value !== '0' && optionIsNumberRegex.test(value)
return optionIsNumberRegex.test(value) && value > 0
},
createOption(option) {
option = option.replace(',', '.')
Expand Down

0 comments on commit 6eb6592

Please sign in to comment.