Skip to content

Commit

Permalink
Merge pull request #22345 from jayeshmangwani/add_validation_room_nam…
Browse files Browse the repository at this point in the history
…e_spanish_alphabets

Add validation for Room Name to accept Spanish Alphabet
  • Loading branch information
youssef-lr authored Jul 12, 2023
2 parents 6595e2a + e0c5a6e commit 03740c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ const CONST = {
CARD_SECURITY_CODE: /^[0-9]{3,4}$/,
CARD_EXPIRATION_DATE: /^(0[1-9]|1[0-2])([^0-9])?([0-9]{4}|([0-9]{2}))$/,
PAYPAL_ME_USERNAME: /^[a-zA-Z0-9]{1,20}$/,
ROOM_NAME: /^#[a-z0-9-]{1,80}$/,
ROOM_NAME: /^#[a-z0-9à-ÿ-]{1,80}$/,

// eslint-disable-next-line max-len, no-misleading-character-class
EMOJIS: /[\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu,
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/ValidationUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ describe('ValidationUtils', () => {
test('room name with lowercase letters, numbers, and dashes', () => {
expect(ValidationUtils.isValidRoomName('#this-is-a-room1')).toBe(true);
});

test('room name with spanish Accented letters and dashes', () => {
expect(ValidationUtils.isValidRoomName('#sala-de-opinión')).toBe(true);
});
});

describe('isValidWebsite', () => {
Expand Down

0 comments on commit 03740c4

Please sign in to comment.