mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
@@ -35,8 +35,8 @@ export default class TeamSignupUrlPage extends React.Component {
|
||||
if (cleanedName !== name || !urlRegex.test(name)) {
|
||||
this.setState({nameError: "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 <= 3 || cleanedName.length > 15) {
|
||||
this.setState({nameError: 'Name must be 4 or more characters up to a maximum of 15'});
|
||||
} else if (cleanedName.length <= 2 || cleanedName.length > 15) {
|
||||
this.setState({nameError: 'Name must be 3 or more characters up to a maximum of 15'});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,12 +23,14 @@ export default class SSOSignUpPage extends React.Component {
|
||||
|
||||
team.display_name = this.state.name;
|
||||
|
||||
if (team.display_name.length <= 3) {
|
||||
if (!team.display_name) {
|
||||
state.nameError = 'Please enter a team name';
|
||||
this.setState(state);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!team.display_name) {
|
||||
state.nameError = 'Please enter a team name';
|
||||
if (team.display_name.length <= 2) {
|
||||
state.nameError = 'Name must be 3 or more characters up to a maximum of 15';
|
||||
this.setState(state);
|
||||
return;
|
||||
}
|
||||
@@ -68,7 +70,7 @@ export default class SSOSignUpPage extends React.Component {
|
||||
}
|
||||
|
||||
var disabled = false;
|
||||
if (this.state.name.length <= 3) {
|
||||
if (this.state.name.length <= 2) {
|
||||
disabled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user