@greghowe79/the-lib 0.7.6 → 0.7.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -108,6 +108,12 @@ const Input = qwik.component$(({ id, type, placeholder, value, error, onValidate
|
|
|
108
108
|
if (!allowed.test(e.key) && e.key.length === 1) {
|
|
109
109
|
e.preventDefault();
|
|
110
110
|
}
|
|
111
|
+
},
|
|
112
|
+
onBeforeInput$: (event) => {
|
|
113
|
+
const e = event;
|
|
114
|
+
if (e.data && /[^0-9]/.test(e.data)) {
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
}
|
|
111
117
|
}
|
|
112
118
|
})
|
|
113
119
|
]
|
|
@@ -106,6 +106,12 @@ const Input = component$(({ id, type, placeholder, value, error, onValidate$, on
|
|
|
106
106
|
if (!allowed.test(e.key) && e.key.length === 1) {
|
|
107
107
|
e.preventDefault();
|
|
108
108
|
}
|
|
109
|
+
},
|
|
110
|
+
onBeforeInput$: (event) => {
|
|
111
|
+
const e = event;
|
|
112
|
+
if (e.data && /[^0-9]/.test(e.data)) {
|
|
113
|
+
e.preventDefault();
|
|
114
|
+
}
|
|
109
115
|
}
|
|
110
116
|
})
|
|
111
117
|
]
|