Skip to content

Commit

Permalink
fix(web): change replicas default value to an empty string and enforc…
Browse files Browse the repository at this point in the history
…e minimum length validation for replicas
  • Loading branch information
AmirhoseinBrz committed Dec 3, 2024
1 parent a7639fd commit 76a2063
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/src/pages/helm-template/helm-template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const HelmTemplate: FC = () => {
name: '',
image: '',
target_port: null,
replicas: null,
replicas: "",
persistance: {},
environment: [
{
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/helm-template/helm-template.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const podSchema = zod.object({
name: zod.string().min(1, 'Name is required'),
image: zod.string().min(1, 'Image is required'),
target_port: zod.string().nullable(),
replicas: zod.string().nullable(),
replicas: zod.string().min(1 ,"Replicas is required"),
persistance: persistanceSchema,
environment: zod
.array(environmentSchema)
Expand Down

0 comments on commit 76a2063

Please sign in to comment.