Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1714 from matrix-org/t3chguy/group_create_dialog_…
Browse files Browse the repository at this point in the history
…fixes

Fix CreateGroupDialog issues
  • Loading branch information
lukebarnard1 authored Jan 22, 2018
2 parents 02824cf + 61b3d05 commit f013ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/views/dialogs/CreateGroupDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ export default React.createClass({

_checkGroupId: function(e) {
let error = null;
if (!/^[a-z0-9=_\-\.\/]*$/.test(this.state.groupId)) {
if (!this.state.groupId) {
error = _t("Community IDs cannot not be empty.");
} else if (!/^[a-z0-9=_\-\.\/]*$/.test(this.state.groupId)) {
error = _t("Community IDs may only contain characters a-z, 0-9, or '=_-./'");
}
this.setState({
groupIdError: error,
// Reset createError to get rid of now stale error message
createError: null,
});
return error;
},
Expand Down
1 change: 1 addition & 0 deletions src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@
"Confirm Removal": "Confirm Removal",
"Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.": "Are you sure you wish to remove (delete) this event? Note that if you delete a room name or topic change, it could undo the change.",
"Community IDs may only contain characters a-z, 0-9, or '=_-./'": "Community IDs may only contain characters a-z, 0-9, or '=_-./'",
"Community IDs cannot not be empty.": "Community IDs cannot not be empty.",
"Something went wrong whilst creating your community": "Something went wrong whilst creating your community",
"Create Community": "Create Community",
"Community Name": "Community Name",
Expand Down

0 comments on commit f013ffd

Please sign in to comment.