Domain Driven Design(DDD) has an abstract repository pattern to handle saving and fetching/finding entities in storage (db, external service, doesn't matter). My question is if Repository Pattern has to only bring the objects to system and put it away and it is basically, for example, objects of database drivers like Mongo or other ORM like JPA, then is there any point to implement any validation there?
My hunch says me that I have to implement validations as a constraints in Factories or Aggregates. So, I don't have to use implementation's mechanisms. However, there are plenty ORMs that require to get a constraints for each field/property, so that it might cause a code duplications.