Skip to content

Commit 8e1a099

Browse files
Spandan-Mishradhairyashiilanikdhabal
authored
fix: added pattern checking for urls while creating a team (calcom#24777)
* fix: added pattern checking for urls while creating a team * update: used slugify and replace logic * update * Fix formatting of rules in CreateANewTeamForm --------- Co-authored-by: Dhairyashil Shinde <93669429+dhairyashiil@users.noreply.github.com> Co-authored-by: Anik Dhabal Babu <adhabal2002@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
1 parent e29aa20 commit 8e1a099

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

apps/web/public/static/locales/en/common.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,7 @@
20222022
"must_enter_team_name": "Must enter a team name",
20232023
"team_url_required": "Must enter a team URL",
20242024
"url_taken": "This URL is already taken",
2025+
"url_alphanumeric_invalid": "Url can only have alphanumeric characters(a-z, 0-9) and hyphen(-) symbol.",
20252026
"problem_registering_domain": "There was a problem with registering the subdomain, please try again or contact an administrator",
20262027
"team_publish": "Publish team",
20272028
"number_text_notifications": "Phone number (Text notifications)",

packages/features/ee/teams/components/CreateANewTeamForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const CreateANewTeamForm = (props: CreateANewTeamFormProps) => {
147147
value={value}
148148
defaultValue={value}
149149
onChange={(e) => {
150-
newTeamFormMethods.setValue("slug", slugify(e?.target.value, true), {
150+
newTeamFormMethods.setValue("slug", slugify(e?.target.value, true).replace(/\./g, ""), {
151151
shouldTouch: true,
152152
});
153153
newTeamFormMethods.clearErrors("slug");

0 commit comments

Comments
 (0)