Refactoring API for record validation.