Files
WRNexusJS/packages
ClintchizandClaude Opus 5 281615a4b0
Quality / quality (ubuntu-latest) (push) Failing after 22s
Quality / quality (windows-latest) (push) Canceled after 0s
fix(validation): stop unrecognised boolean strings coercing to a silent false
checkField in packages/validation/src/index.ts (and its browser mirror in
runtime.ts) treated any string other than "true"/"on" as false with no
error, so typos like "treu" or values like "yes"/"1"/"TRUE" silently
passed as false.

Now:
- true/false booleans pass through unchanged
- recognised true strings (case-insensitive, trimmed): true, on, 1, yes
- recognised false strings: false, off, 0, no
- numeric 1/0 coerce (JSON payloads)
- undefined/null/"" still coerce to false (unchecked-checkbox semantics)
- anything else is now a type error (desc.typeMessage or "Must be true or
  false") instead of a silent false

Locked-in behaviours preserved: a required boolean given false still
errors, and parseEnv DEBUG: "true" coercion still works.

Added coverage for recognised strings, numeric 1/0, the type-error
regression guard, absent/empty handling, the required+false case, and a
client/server parity test driving both checkField and the browser runtime
through the same inputs.

Blast radius: searched packages/, examples/, services/ for v.boolean()
usage; all existing call sites (auth consent/rememberDevice, db 'active'
default, example consent checkboxes) feed true/false/'on'/absent values,
none of which change behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-19 21:26:20 +05:30
..
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30
2026-08-11 13:40:03 +05:30