fix: added pattern checking for urls while creating a team (#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>
This commit is contained in:
2 files changed
+2
-1
No files matched your search
@@ -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)",
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user