I am developing an application and trying to use a DDD approach. I modeled all my entities and aggregates in the domain. Now I would like to keep my validation logic in the domain, but I need to support some bulk import functionality(via a csv file). I need to validate the file and give the user information about the rows that need corrections.
What would be the best DDD way to do this? The validation logic is quite complex and I wouldn't like to duplicate the csv file validation in the domain. Also the file structure is a more flatten structure which is different from the domain aggregate. So even if I validate the aggregate the row information is lost.