Refactored validation context method