Skip to content

Commit 573b26f

Browse files
committed
fixes
1 parent 9cb1dc8 commit 573b26f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/components/ControlPlanes/List/ControlPlaneListToolbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function ControlPlaneListToolbar({ projectName }: { projectName: string }
1414
<Toolbar>
1515
<ToolbarButton icon="add" text={t('ControlPlaneListToolbar.buttonText')} onClick={() => setDialogIsOpen(true)} />
1616
</Toolbar>
17-
<CreateWorkspaceDialogContainer isOpen={dialogCreateProjectIsOpen} setIsOpen={setDialogIsOpen} project={projectName} type={'workspace'}/>
17+
<CreateWorkspaceDialogContainer isOpen={dialogCreateProjectIsOpen} setIsOpen={setDialogIsOpen} project={projectName}/>
1818
</>
1919
)
2020

src/components/Dialogs/CreateProjectWorkspaceDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function CreateProjectWorkspaceDialogContent({
115115
<Input id="name"
116116
{...register('name')}
117117
valueState={errors.name ? "Negative" : "None"}
118-
valueStateMessage={<span>Use A-Z, a-z, 0-9, hyphen (-), and period (.), but note that whitespace (spaces, tabs, etc.) is not allowed for proper compatibility.</span>}
118+
valueStateMessage={<span>{errors.name?.message}</span>}
119119
required></Input>
120120

121121
</FormItem>

src/lib/api/validations/schemas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const MemberSchema = z.object({
88
});
99

1010
export const validationSchemaProjectWorkspace = z.object({
11-
name: z.string().min(1, "Name is required").regex(/^(?!-)[a-zA-Z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-zA-Z0-9-]{1,63}(?<!-))*$/, 'Invalid'),
11+
name: z.string().min(1, "This field is required").regex(/^(?!-)[a-zA-Z0-9-]{1,63}(?<!-)(?:\.(?!-)[a-zA-Z0-9-]{1,63}(?<!-))*$/, 'Use A-Z, a-z, 0-9, hyphen (-), and period (.), but note that whitespace (spaces, tabs, etc.) is not allowed for proper compatibility.').max(25, 'Max length is 25 characters'),
1212
displayName: z.string().optional(),
1313
chargingTarget: z.string().optional(),
1414
members: z.array(MemberSchema).nonempty()

0 commit comments

Comments
 (0)