I'm trying to understand DDD concept and validation of entities inside aggregate root. Let me explain.
Let's assume we have Web app where user have to register to the app and can join tournament (let's say by scaning qr code). Later on he'll be able to select a team but it's not important in this case.
I have no problem with modeling player/user registration or tournament creation. But I have no clue how to resolve issue with player joining to tournament.
I know player identity (his id from http request) and tournament as well. But where should I validate that user who want to join tournament exists?
I can't assume that in my tournament method
.AddPlayer(Player player)
player who is passed to a method is valid because someone can easly pass null or player who never registered to my app. I know it's a simple app and that case may never happen but it's great case to overcome ;)
Domain service is the right place to do this kind of validation? So should I call it in my application layer to validate player or can we validate in other way somehow? Let's assume that player existance in the system is critical for that app.