From abc82dd41a4eea82179a5639615014ced4a2546b Mon Sep 17 00:00:00 2001 From: David Chicaiza Date: Wed, 2 Sep 2026 10:26:53 +0200 Subject: [PATCH] docs(validator): say why fillDefaults drops the boolean arm BlueprintValidator's useDefaults is `boolean | 'always' | 'requiredOnly'` and fillDefaults is only the two strings. Read cold, the missing arm looks like an oversight rather than a decision. It is a decision: `true` is a legacy alias for 'always', not a third behaviour, and the platform's public validation parameter already exposes only the two named modes. Comment only, no behaviour change. MAIA-1286 --- src/types.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index c4395ce..e95fb32 100644 --- a/src/types.ts +++ b/src/types.ts @@ -414,7 +414,12 @@ export type FormanValidationOptions = { * `appliedDefaults`. Values the caller provided are never overwritten, except `''`, which * counts as an omission and fills — so under `'always'` a deliberately cleared optional * field comes back with its default. An explicit `null` is a provided value: it never fills - * and still fails as mandatory. Inactive branches are never filled. */ + * and still fails as mandatory. Inactive branches are never filled. + * + * BlueprintValidator's option also accepts `boolean`; that arm is deliberately not carried + * over. `useDefaults: true` is a legacy alias for `'always'` rather than a third behaviour, + * and the platform's own public validation parameter already exposes just the two named + * modes, so there is nothing behind the boolean for a new library to inherit. */ fillDefaults?: 'requiredOnly' | 'always'; /** Maps domain names used in nested.domain to actual domain keys passed to validateFormanWithDomains */ domainAliases?: Record;