Validation logic should reside within the object responsible for the data.
Misplacing validation logic can lead to code duplication and maintenance issues. For example, a `CartItem` should validate the quantity to ensure it's positive, rather than relying on the `Cart` to perform this check. This keeps the responsibility of validating the state with the object owning the data.
Additional Notes
How can validation logic be misplaced in object design?