diff --git a/src/member/constants.test.ts b/src/member/constants.test.ts index 69301a77..7c0ba022 100644 --- a/src/member/constants.test.ts +++ b/src/member/constants.test.ts @@ -12,28 +12,6 @@ describe('Member constants', () => { // prettier-ignore const validUsername1 = 'Jéàn de l\'Avoiné'; - it('username forbidden characters regex', () => { - expect(invalidUsername).toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - expect(invalidUsername1).toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - expect(invalidUsername2).toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - expect(invalidUsername3).toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - - expect(validUsername).not.toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - expect(validUsername1).not.toMatch( - MemberConstants.USERNAME_FORBIDDEN_CHARS_REGEX, - ); - }); - it('username format regex', () => { expect(invalidUsername).not.toMatch(MemberConstants.USERNAME_FORMAT_REGEX); expect(invalidUsername1).not.toMatch(MemberConstants.USERNAME_FORMAT_REGEX); diff --git a/src/member/constants.ts b/src/member/constants.ts index d976de35..19187831 100644 --- a/src/member/constants.ts +++ b/src/member/constants.ts @@ -1,5 +1,3 @@ export const MemberConstants = { - USERNAME_FORBIDDEN_CHARS_REGEX: - /["<>^%\\\u{0000}-\u{001F}\u{007F}-\u{009F}]+/u, USERNAME_FORMAT_REGEX: /^[^"<>^%\\\u{0000}-\u{001F}\u{007F}-\u{009F}]+$/u, };