public override bool IsValid(SmsValidation smsValidation) { if (smsValidation.UserInput != smsValidation.Code) { return(false); } return(NextRule?.IsValid(smsValidation) ?? true); }
public override bool IsValid(SmsValidation smsValidation) { if (smsValidation.Sent < DateTime.UtcNow.AddMinutes(ExpirationMinutes)) { return(false); } return(NextRule?.IsValid(smsValidation) ?? true); }
public override bool IsValid(SmsValidation smsValidation) { if (smsValidation.Attempts >= MaxAttempts) { return(false); } return(NextRule?.IsValid(smsValidation) ?? true); }