I managed this in this way:
public SignInViewModelValidator(IMembershipService membershipService){
_membershipService = membershipService;
bool firstPhasePassed = true;
RuleFor(x => x.EMail)
.NotEmpty().WithMessage("")
.EmailAddress().WithMessage("")
.OnAnyFailure(x => { firstPhasePassed = false; });
RuleFor(x => x.Password)
.NotEmpty().WithMessage("")
.Length(6, 16).WithMessage("")
.OnAnyFailure(x => { firstPhasePassed = false; });
When(x => firstPhasePassed, () =>
{
Custom(x =>
{
if (_membershipService.ValidateUser(x.EMail, x.Password) == null)
return new ValidationFailure("EMail", "");
return null;
});
});
}