我有以下代码。如果basevalidator中有错误,我不想执行RuleFor createdby。我该怎么办?
public GroupValidator()
{
Include(new BaseValidator());
RuleFor(x => x.CreatedBy)
.Cascade(CascadeMode.StopOnFirstFailure)
.NotEmpty()
.Length(2, 500).WithMessage("Created by should not be empty and between 2 and 500 characters.");
}