- controllo della @ sull'username telegram (sugli Eventi)
- controllo email di test, se funzionante o no
This commit is contained in:
@@ -449,6 +449,10 @@ export default defineComponent({
|
||||
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
newval = tools.removespaces_slash(newval)
|
||||
}
|
||||
|
||||
if (col.value.fieldtype === costanti.FieldType.username_telegram) {
|
||||
newval = tools.removeatIniziale(newval)
|
||||
}
|
||||
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
|
||||
|
||||
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
|
||||
@@ -953,10 +957,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function nameKeydown(e: any, col: any) {
|
||||
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
if (col.fieldtype === costanti.FieldType.username_telegram) {
|
||||
if (!/^[a-z0-9_]*$/i.test(e.key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (/^\W$/.test(e.key)) {
|
||||
e.preventDefault();
|
||||
} else {
|
||||
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
|
||||
|
||||
if (/^\W$/.test(e.key)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user