show errors for restricted team names, "all teams" and "no team" (#22043)

relates to #21971

Show error messages when trying to create a team called "All teams" and
"no team"

**all teams error:**


![image](https://github.com/user-attachments/assets/de00754c-176c-4362-9243-ce97719dff74)

**no team error:**


![image](https://github.com/user-attachments/assets/7b41e760-1779-4b53-8ba9-8ca12d84493a)


- [x] Manual QA for all new/changed functionality
This commit is contained in:
Gabriel Hernandez 2024-09-12 18:28:12 +01:00 committed by GitHub
parent 4c24729df0
commit 3599c2b49a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,11 +116,11 @@ const TeamManagementPage = (): JSX.Element => {
setBackendValidators({
name: "A team with this name already exists",
});
} else if (createError.data.errors[0].reason.includes("all teams")) {
} else if (createError.data.errors[0].reason.includes("All teams")) {
setBackendValidators({
name: `"All teams" is a reserved team name. Please try another name.`,
});
} else if (createError.data.errors[0].reason.includes("no team")) {
} else if (createError.data.errors[0].reason.includes("No team")) {
setBackendValidators({
name: `"No team" is a reserved team name. Please try another name.`,
});