Implementation note that saves a lot of grief: do not clear the error the instant the value becomes technically valid if the field is still focused and the user is mid-edit.
A field can pass through valid states while being edited — deleting the end of an address, for instance — and flickering between error and no-error under the cursor is more distracting than either state alone.
Debounce it, or simply hold the last decision until blur once an error exists. Cheap to implement, and it removes the twitchiness people describe but rarely name.