Members field now allows only integers

This commit is contained in:
a-ill
2023-08-01 18:19:40 +03:00
parent 60dcee4023
commit 7cdafeed3c
42 changed files with 626 additions and 48 deletions

View File

@@ -85,8 +85,8 @@ export function validateAge(event,input,callback) {
}
}
export function validatePosNumber(event,input,callback,max) {
event.returnValue = false
export function validatePosNumber(event,input,max) {
event.preventDefault()
var key
if (event.type === 'paste') {
key = event.clipboardData.getData('text/plain');
@@ -101,12 +101,9 @@ export function validatePosNumber(event,input,callback,max) {
if (val>max) {
input.value = max
}
if (callback!=undefined) {
callback(input.value)
}
}
else {
callback(input.value)
input.value = ""
}
}