Skip to content

Commit f001388

Browse files
authored
Merge pull request #6506 from DougReeder/pronouns
Pronouns may also be separated by comma or space
2 parents 096e54d + b4c6b1c commit f001388

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/react-components/room/AvatarSettingsContent.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function AvatarSettingsContent({
2727
label={<FormattedMessage id="avatar-settings-content.display-name-label" defaultMessage="Display Name" />}
2828
value={displayName}
2929
pattern={displayNamePattern}
30+
placeholder="displayed over your avatar"
3031
spellCheck="false"
3132
required
3233
onChange={onChangeDisplayName}
@@ -42,6 +43,7 @@ export function AvatarSettingsContent({
4243
label={<FormattedMessage id="avatar-settings-content.pronouns-label" defaultMessage="Pronouns (optional)" />}
4344
value={pronouns}
4445
pattern={pronounsPattern}
46+
placeholder="slash, comma or space separated"
4547
spellCheck="false"
4648
onChange={onChangePronouns}
4749
ref={pronounsInputRef}

src/storage/store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const SCHEMA = {
6565
properties: {
6666
displayName: { type: "string", pattern: "^[A-Za-z0-9_~\\s\\-]{3,32}$" },
6767
avatarId: { type: "string" },
68-
pronouns: { type: "string", pattern: "^([a-zA-Z]{1,32}\\/){0,4}[a-zA-Z]{1,32}$" },
68+
pronouns: { type: "string", pattern: "^([a-zA-Z]{1,32}[\\/, ]\\s*){0,4}[a-zA-Z]{1,32}$" },
6969
// personalAvatarId is obsolete, but we need it here for backwards compatibility.
7070
personalAvatarId: { type: "string" }
7171
}

0 commit comments

Comments
 (0)