mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 19:28:16 +00:00
fix: add input max length for org and project name
This commit is contained in:
@@ -245,6 +245,7 @@ export default function UserInfoStep({
|
|||||||
placeholder="Infisical"
|
placeholder="Infisical"
|
||||||
onChange={(e) => setOrganizationName(e.target.value)}
|
onChange={(e) => setOrganizationName(e.target.value)}
|
||||||
value={organizationName}
|
value={organizationName}
|
||||||
|
maxLength={64}
|
||||||
isRequired
|
isRequired
|
||||||
className="h-12"
|
className="h-12"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ const supportOptions = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const formSchema = yup.object({
|
const formSchema = yup.object({
|
||||||
name: yup.string().required().label("Project Name").trim(),
|
name: yup.string().required().label("Project Name").trim().max(64, "Too long, Maximum length is 64 characters"),
|
||||||
addMembers: yup.bool().required().label("Add Members")
|
addMembers: yup.bool().required().label("Add Members")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ const LearningItemSquare = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const formSchema = yup.object({
|
const formSchema = yup.object({
|
||||||
name: yup.string().required().label("Project Name").trim(),
|
name: yup.string().required().label("Project Name").trim().max(64, "Too long, Maximum length is 64 characters"),
|
||||||
addMembers: yup.bool().required().label("Add Members")
|
addMembers: yup.bool().required().label("Add Members")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -10,7 +10,11 @@ import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@a
|
|||||||
import { useUpdateOrg } from "@app/hooks/api";
|
import { useUpdateOrg } from "@app/hooks/api";
|
||||||
|
|
||||||
const formSchema = yup.object({
|
const formSchema = yup.object({
|
||||||
name: yup.string().required().label("Project Name")
|
name: yup
|
||||||
|
.string()
|
||||||
|
.required()
|
||||||
|
.label("Organization Name")
|
||||||
|
.max(64, "Too long, Maximum length is 64 characters")
|
||||||
});
|
});
|
||||||
|
|
||||||
type FormData = yup.InferType<typeof formSchema>;
|
type FormData = yup.InferType<typeof formSchema>;
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import { useToggle } from "@app/hooks";
|
|||||||
import { useRenameWorkspace } from "@app/hooks/api";
|
import { useRenameWorkspace } from "@app/hooks/api";
|
||||||
|
|
||||||
const formSchema = yup.object({
|
const formSchema = yup.object({
|
||||||
name: yup.string().required().label("Project Name")
|
name: yup.string().required().label("Project Name").max(64, "Too long, Maximum length is 64 characters"),
|
||||||
});
|
});
|
||||||
|
|
||||||
type FormData = yup.InferType<typeof formSchema>;
|
type FormData = yup.InferType<typeof formSchema>;
|
||||||
|
|||||||
@@ -244,6 +244,7 @@ export const UserInfoSSOStep = ({
|
|||||||
onChange={(e) => setOrganizationName(e.target.value)}
|
onChange={(e) => setOrganizationName(e.target.value)}
|
||||||
isRequired
|
isRequired
|
||||||
className="h-12"
|
className="h-12"
|
||||||
|
maxLength={64}
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
{organizationNameError && (
|
{organizationNameError && (
|
||||||
|
|||||||
Reference in New Issue
Block a user