mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Changed constants name MIN_TEAM_LENGTH value to 2 and the error message (#4149)
This commit is contained in:
@@ -30,7 +30,7 @@ export default class TeamSignupDisplayNamePage extends React.Component {
|
||||
this.setState({nameError: Utils.localizeMessage('create_team.display_name.required', 'This field is required')});
|
||||
return;
|
||||
} else if (displayName.length < Constants.MIN_TEAMNAME_LENGTH || displayName.length > Constants.MAX_TEAMNAME_LENGTH) {
|
||||
this.setState({nameError: Utils.localizeMessage('create_team.display_name.charLength', 'Name must be 4 or more characters up to a maximum of 15')});
|
||||
this.setState({nameError: Utils.localizeMessage('create_team.display_name.charLength', 'Name must be 2 or more characters up to a maximum of 15')});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,9 @@ export default class TeamUrl extends React.Component {
|
||||
if (cleanedName !== name || !urlRegex.test(name)) {
|
||||
this.setState({nameError: Utils.localizeMessage('create_team.team_url.regex', "Use only lower case letters, numbers and dashes. Must start with a letter and can't end in a dash.")});
|
||||
return;
|
||||
} else if (cleanedName.length < Constants.MIN_TEAMNAME_LENGTH || cleanedName.length > Constants.MAX_TEAMNAME_LENGTH) {
|
||||
this.setState({nameError: Utils.localizeMessage('create_team.team_url.charLength', 'Name must be 2 or more characters up to a maximum of 15')});
|
||||
return;
|
||||
}
|
||||
|
||||
for (let index = 0; index < Constants.RESERVED_TEAM_NAMES.length; index++) {
|
||||
|
||||
Reference in New Issue
Block a user