Using ASP.NET Core-6 Web API, I have this validator using Fluent Validation:
public CustomerValidator()
{
RuleFor(p => p.NotificationType)
.Cascade(CascadeMode.StopOnFirstFailure)
.NotEmpty().WithMessage("{PropertyName} should be not empty. NEVER!");
}
How do I validate that NotificationType must have any of the following: SMS or Email or Both?
Thank you