OhMyBug

input/serialization

Non-Empty Mistaken For Valid

#27rare21 sightingsfirst seen August 2026

What goes wrong

A read path or fallback chain only checks that a value is present, non-empty or truthy, never that it is valid. A present but invalid value — zero, a negative, an out-of-range list element, a hand-edited number — is passed on as an explicit valid choice instead of falling back to the default or being refused.

Example

The code only checks that a limit is set, so a stored limit of -1 passes the check and is used as a real limit.

Not to be confused with

A non-empty invalid value is treated as valid — not several empties folded into one (Empty states lose their meaning), not null elements inside a list (Container passes with null elements), and not a yes-or-no flag read by truthiness (Boolean Knob Read By Truthiness).

Discovered by

Field notes · 4