I have created interface IValidator and few classes which implement this interface as you can see in the picture. I have class UserAccountManager which manages user account - creates new account, changes profile details, changes password etc... Problem is that I need validate user user input in some cases (change password, registration...) and I need multiple valitators for it. I dont think that this design is good because of multiple validators in constructor. Is there any better aproach?
Aucun commentaire:
Enregistrer un commentaire