Skip to content

Commit

Permalink
Fixed #1542 - InputNumber: setting "min" to anything greater than 0 i…
Browse files Browse the repository at this point in the history
…mplies "required"
  • Loading branch information
mertsincan committed Sep 13, 2021
1 parent a3979ad commit 3039690
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/inputnumber/InputNumber.vue
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,10 @@ export default {
return false;
},
validateValue(value) {
if (value === '-' || value == null) {
return null;
}
if (this.min != null && value < this.min) {
return this.min;
}
Expand All @@ -784,10 +788,6 @@ export default {
return this.max;
}
if (value === '-') { // Minus sign
return null;
}
return value;
},
updateInput(value, insertedValueStr, operation, valueStr) {
Expand Down

0 comments on commit 3039690

Please sign in to comment.