I have this validator using Fluent Validation in ASP.NET Core-6 Web API :
public TransactionValidator()
{
RuleFor(p => p.Token)
.Cascade(CascadeMode.StopOnFirstFailure);
}
Token should either be null, or it has input value of exactly 6 lengths.
How do I get this done?