if (!model.EVENT_valueChange) {
    model.on('valueChange', () => {
        let textboxPassportNumberZ = model.playerModel.getModelWithId('textbox_passport_number_z'); //поменять на нужный textbox
        
        if (textboxPassportNumberZ) {
            let inputValue = textboxPassportNumberZ.getValue();
            let numberOnly = inputValue.replace(/\D/g, '');
            if (numberOnly) {
                textboxPassportNumberZ.setValue(`${numberOnly} мес.`);
            }
        } else {
            console.error('Поле "textbox_passport_number_z" не найдено.');
        }
    });
    model.EVENT_valueChange = true;
}