I have a validation in controller when user wants to create new account with classic dto model (Nickname, Email, Password).
I use Fluent Validation for checking for example if password is not null and have more than 5 chars.
I need to check if Nickname and Email already exist in database. Should it be done inside FluentValidation with injecting UserService and EmailService into Validator constructor? Is it better to validate user existence and email existence apart from FluentValidatoin just using UserService and EmailService in the controller? I think about pros and cons of both approaches.
It's good that you are open to both options and looking to evaluate pros and cons. Perhaps think about how your application is structured. If everything else is done with FluentValidation it's probably worth it to abstract the validation in that way. If you are only using FluentValidation in some places it's probably not worth it since there is already no consistency.
I would probably inject the services in the FluentValidation constructor. To keep information private, I would add public userExists() and emailExists() methods to these services.