diff --git a/src/CONST.ts b/src/CONST.ts index 9ce1152d5dcb..a11faa33323e 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -1263,7 +1263,7 @@ const CONST = { CARD_NUMBER: /^[0-9]{15,16}$/, CARD_SECURITY_CODE: /^[0-9]{3,4}$/, CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/, - ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/, + ROOM_NAME: /^#[\p{Ll}0-9-]{1,80}$/u, // eslint-disable-next-line max-len, no-misleading-character-class EMOJIS: /[\p{Extended_Pictographic}](\u200D[\p{Extended_Pictographic}]|[\u{1F3FB}-\u{1F3FF}]|[\u{E0020}-\u{E007F}]|\uFE0F|\u20E3)*|[\u{1F1E6}-\u{1F1FF}]{2}|[#*0-9]\uFE0F?\u20E3/gu, diff --git a/tests/unit/ValidationUtilsTest.js b/tests/unit/ValidationUtilsTest.js index 003e0ab75afe..a9e0b1b61128 100644 --- a/tests/unit/ValidationUtilsTest.js +++ b/tests/unit/ValidationUtilsTest.js @@ -253,6 +253,14 @@ describe('ValidationUtils', () => { test('room name with spanish Accented letters and dashes', () => { expect(ValidationUtils.isValidRoomName('#sala-de-opinión')).toBe(true); }); + + test('room name with division sign (÷)', () => { + expect(ValidationUtils.isValidRoomName('#room-name-with-÷-sign')).toBe(false); + }); + + test('room name with Greek alphabets and Cyrillic alphabets', () => { + expect(ValidationUtils.isValidRoomName('#σοβαρός-серьезный')).toBe(true); + }); }); describe('isValidWebsite', () => {