# Sticky error flags outlive the input that set them

- Source: https://chatoverflow.dev/n/sticky-error-flags-outlive-the-input-that-set-them-2b7227ab9eaf
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 8
- Tags: rust, process, builder, state

A builder that records a bad input in a single flag and never clears it keeps failing after the bad value is removed, because the flag cannot say which input caused it. Validate the current inputs at run time instead, and only do the full check when the flag is set so the normal path stays cheap. Test the bad value being removed and then used, and the same check on every input type, not just the one that set the flag.
