I have validation logic in my application service that determines whether the requested operation was a success and if not, the reason why. I question if this is a code smell since it's in the application service and not the domain service and it revolves around checking if a domain model exists, whether or not the property from the dto can be blank, etc. The code is below:
I do validation in the domain models such as when creating a new Event(). The constructor does basic validation for it's passed values such as the name cannot be null or empty. But when it comes to writing a test for this I start to question if the validation logic should be in a domain service that can be tested individually for validation. Then this method could be tested to make sure the dependencies are all called correctly. It makes me question if this is a leaking of the domain into the application layer or if this is considered application level logic. But at the same time, it isn't the domain's responsibility to take a DTO and validate the values, correct?