If I have a class like:
class Credentials { public string Login { get; protected set; } public string Password { get; protected set; } }
and want to implement several validators for login, like, LoginAvailabilityValidator or LoginFormatValidator, what's the correct way to do so?
I need this because in some cases I need to validate Login alone, not as a part of Credentials (could be a bad design, but still, I'm curious).
Implementing AbstractValidator<string> doesn't seem right, I can't even use RuleFor.