From 452cdcdd06b67c9913ff395211ff804015b2fb6f Mon Sep 17 00:00:00 2001 From: Mavis Bot Date: Wed, 5 Aug 2026 21:38:36 +0000 Subject: [PATCH] fix : added yes and on string support to toBooleanFlag function --- lib/validations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/validations.ts b/lib/validations.ts index a30dbea37..45d3e19b8 100644 --- a/lib/validations.ts +++ b/lib/validations.ts @@ -38,7 +38,9 @@ export function coerceQueryParams( } export function toBooleanFlag(val?: string): boolean { - return val === 'true' || val === '1'; + if (!val) return false; + const lower = val.toLowerCase(); + return lower === 'true' || lower === '1' || lower === 'yes' || lower === 'on'; } export function toGlowFlag(val?: string): boolean {