Skip to content

Scheduling infrastructure for absolutely everyone.

fix: added pattern checking for urls while creating a team (#24777)

spandev8e1a0999d2ff
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json
index 34643b62a33..5d7c54f44a1 100644
--- a/apps/web/public/static/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -2022,6 +2022,7 @@
"must_enter_team_name": "Must enter a team name",
"team_url_required": "Must enter a team URL",
"url_taken": "This URL is already taken",
+ "url_alphanumeric_invalid": "Url can only have alphanumeric characters(a-z, 0-9) and hyphen(-) symbol.",
"problem_registering_domain": "There was a problem with registering the subdomain, please try again or contact an administrator",
"team_publish": "Publish team",
"number_text_notifications": "Phone number (Text notifications)",
diff --git a/packages/features/ee/teams/components/CreateANewTeamForm.tsx b/packages/features/ee/teams/components/CreateANewTeamForm.tsx
index 690583a0bf7..3b09801555a 100644
--- a/packages/features/ee/teams/components/CreateANewTeamForm.tsx
+++ b/packages/features/ee/teams/components/CreateANewTeamForm.tsx
@@ -147,7 +147,7 @@ export const CreateANewTeamForm = (props: CreateANewTeamFormProps) => {
value={value}
defaultValue={value}
onChange={(e) => {
- newTeamFormMethods.setValue("slug", slugify(e?.target.value, true), {
+ newTeamFormMethods.setValue("slug", slugify(e?.target.value, true).replace(/\./g, ""), {
shouldTouch: true,
});
newTeamFormMethods.clearErrors("slug");