diff --git a/apps/app/pages/[workspaceSlug]/me/profile/index.tsx b/apps/app/pages/[workspaceSlug]/me/profile/index.tsx index 2d9377b51..71c9cd094 100644 --- a/apps/app/pages/[workspaceSlug]/me/profile/index.tsx +++ b/apps/app/pages/[workspaceSlug]/me/profile/index.tsx @@ -205,9 +205,6 @@ const Profile: NextPage = () => {

Full Name

-

- This name will be reflected on all the projects you are working on. -

{

Display Name

- The email address that you are using. + This could be your first name, or a nickname — however you{"'"}d like people to + refer to you in Plane.

@@ -246,13 +244,19 @@ const Profile: NextPage = () => { placeholder="Enter your display name" validations={{ required: "Display name is required.", - minLength: { - value: 3, - message: "Display name must be at least 3 characters long.", - }, - maxLength: { - value: 20, - message: "Display name should not exceed 20 characters", + validate: (value) => { + if (value.trim().length < 1) return "Display name can't be empty."; + + if (value.split(" ").length > 1) + return "Display name can't have two consecutive spaces."; + + if (value.replace(/\s/g, "").length < 1) + return "Display name must be at least 1 characters long."; + + if (value.replace(/\s/g, "").length > 20) + return "Display name must be less than 20 characters long."; + + return true; }, }} />