Skip to content

Commit b0a0ff9

Browse files
author
Anush Kamble
committed
fix(validation): reorder org validation chain - max/regex before optional
1 parent e2e52cd commit b0a0ff9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/validations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ export const streakParamsSchema = z.object({
185185
repo: z.string().optional(),
186186
org: z
187187
.string()
188-
.optional()
189188
.max(39, { message: 'Organization name cannot exceed 39 characters' })
190189
.regex(GITHUB_USERNAME_REGEX, {
191190
message: 'Invalid organization name format',
192-
}),
191+
})
192+
.optional(),
193193
labels: z.string().optional().transform(toBooleanFlag),
194194
labelColor: z
195195
.string()

0 commit comments

Comments
 (0)