Skip to content

Commit 4adfbf5

Browse files
committed
prevent negative value paste
1 parent cefd709 commit 4adfbf5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ export function updateValue(el: CustomInputElement, vnode: VNode | null, { emit
122122

123123
// check value with in range max and min value
124124
if (clean) {
125-
if (options.max && Number(unmasked) > options.max) {
125+
if (Number(options.max) === options.max && Number(unmasked) > options.max) {
126126
masked = number.format(options.max)
127127
unmasked = number.unformat(options.max)
128-
} else if (options.min && Number(unmasked) < options.min) {
128+
} else if (Number(options.min) === options.min && Number(unmasked) < options.min) {
129129
masked = number.format(options.min)
130130
unmasked = number.unformat(options.min)
131131
}

0 commit comments

Comments
 (0)