# 15.19 Validate every source of change the same way

> Chapter 15, Accessibility and input. Section: Timing and agents. Guide: https://www.designguide.dev/md/15-accessibility-and-input.md#validate-every-source-of-change-the-same-way

Default

**Rule:** Run the same validation on every change, whether a person, a keyboard, or an agent makes it.

**Why:** A check in a press handler never runs when an agent sets a value directly.

- Put checks in the change itself, not in key or press events.
- Record who made each change: a person or an agent.
- Let people undo agent changes and keep their own edits.

| Source | Value | Result |
| --- | ---: | --- |
| Person types | 0 | Rejected: Enter 1 or more guests. |
| Keyboard paste | 0 | Rejected: Enter 1 or more guests. |
| Agent sets the value | 0 | Rejected: Enter 1 or more guests. |
