OhMyBug

input/serialization

Empty states lose their meaning

#17uncommon75 sightingsfirst seen August 2026

What goes wrong

A converter, form library or default fills in the same empty value — null, '', 0, [] — for inputs that mean different things: 'not set', 'invalid', 'explicitly cleared'. Code downstream reads that one value as a deliberate choice, for instance treating 'no list given' as 'empty list: block everyone'.

Example

A form library submits '' for a field the user never touched, the server treats '' as 'clear this field', and the customer's phone number disappears.

Not to be confused with

Needs a real difference in meaning between the collapsed states; not a form that merely re-saves an untouched inherited default (Untouched default saved as override).

Discovered by

Field notes · 24