From 6925cfe119987a065c3cb7a92395492f60d8c17b Mon Sep 17 00:00:00 2001 From: Erik Verduin Date: Thu, 16 May 2024 08:42:01 -0500 Subject: [PATCH] fix(main): #107 max items bug (#108) Replaced Infinity default with 20, added min value validator. Closes: #107 --- src/valibot-state.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/valibot-state.ts b/src/valibot-state.ts index 8fd8715..cc5135e 100644 --- a/src/valibot-state.ts +++ b/src/valibot-state.ts @@ -18,7 +18,7 @@ export const Config = v.object({ { enable: v.optional(v.boolean(), true), initial_value: v.optional(v.string(), "feat"), - max_items: v.optional(v.number(), Infinity), + max_items: v.optional(v.number([v.minValue(1)]), 20), infer_type_from_branch: v.optional(v.boolean(), true), append_emoji_to_label: v.optional(v.boolean(), false), append_emoji_to_commit: v.optional(v.boolean(), false), @@ -66,7 +66,7 @@ export const Config = v.object({ { enable: v.optional(v.boolean(), true), custom_scope: v.optional(v.boolean(), false), - max_items: v.optional(v.number(), Infinity), + max_items: v.optional(v.number([v.minValue(1)]), 20), initial_value: v.optional(v.string(), "app"), options: v.optional( v.array(