Add record validation to the API.