_keyUp(event: any) { const pattern = /[0-9+- ]/; let inputChar = String.fromCharCode(event.key); if (!pattern.test(inputChar)) { // invalid character, prevent input event.preventDefault(); } }