Ideally, you shouldn't need to store this information explicitly at all. It should follow implicitly from the control flow of your program.
;; Very easy to read
ROUTINE ProcessItem(item)
BEGIN
IF IsValidItem(item) THEN
ProcessValidItem(item)
ELSE
ProcessInvalidItem(item)
FI
END
ROUTINE ProcessValidItem(item)
BEGIN
DoSomething(item)
DoAnotherThing(item)
DoThisThing(item)
END
ROUTINE ProcessInvalidItem(item)
BEGIN
DoSomethingElse(item)
DoAnotherThing(item)
END
Inside the subroutines ProcessValidItem and ProcessInvalidItem, I don't need a flag that tells me whether an item is valid. If the structure of your program implies the validity of an item, you also cannot forget checking it. Validity should be checked at exactly one point, if possible. Instead of combining the treatment of valid and invalid items in the same function and deciding repetitively what to do depending on a “valid” flag, separate the control flow into two distinct, straight-forward code paths and factor the parts that are common to the treatment of both, valid and invalid items, out into subroutines. I find the code shown above much cleaner than the following example.
;; Not so easy to read
ROUTINE ProcessItem(item)
BEGIN
valid ← IsValidItem(item)
IF valid THEN
DoSomething(item)
ELSE
DoSomethingElse(item)
FI
DoAnotherThing(item)
IF valid THEN
DoThisThing(item)
FI
END
If you do have to store the validity on a per-item base, this flag should be owned by whomever determines the validity.
If an object can validate itself, it should have a method that tells whether it is valid. Whether it validates itself each time this method is called or caches it in a private field is an implementation detail. It would clearly break encapsulation to let code outside that class mess with the value of that field.
On the other hand, if the object is validated by someone else, then this somebody is responsible for keeping the information – outside the object. Giving the object access to its externally determined validation status would be just as wrong as giving somebody else access to the object's internal state. A simple pair structure could be used to attach such information to an object – and remove it again when no longer needed. In an object-oriented setup, the flag could be replaced by polymorphism to save one word of storage for the cost of a virtual method call.
+-------------------------+
| ValidatedItem<T> |
+-------------------------+
| - item : T |
+-------------------------+
| + getItem() : T |
| + isValid() : Boolean |
+-------------------------+
^
|
+-------------------+-------------------+
| |
+-------------------------+ +-------------------------+
| ValidItem<T> | | InvalidItem<T> |
+-------------------------+ +-------------------------+
| + isValid() : Boolean | | + isValid() : Boolean |
+-------------------------+ +-------------------------+