---
title: SendPendRequestValidator
summary: API reference for SendPendRequestValidator.
status: draft
owner: SAIF Doc Gen
last_reviewed: 2026-09-24
library: SAIF.Services
reference_type: package
---

# SendPendRequestValidator

Validates a `SendPendRequest`, which routes bills to a reviewer's mailbox pending further action: it requires a recipient mail id that resolves to a real employee (via `IRepositoryFactory`'s `Employee` repository), bounds the pend date to a window from yesterday through 60 days out, and — when conflict-access validation is requested on the request (`ValidateConflictAccess`) — checks, for every bill in `BillsToPend`, that the recipient's claim security profile grants conflict access to that bill's claim. The conflict-access check reconstructs a `Bill` domain object per id using six injected dependencies and compares it against the recipient's `ClaimUserSecurityAccess` via `ClaimSecurityService`.

## Purpose
- Requires `SendtoMailId` to be non-null and, when present, to match an existing `Employee.UserId` (case-insensitive via `.ToUpper()`), via `IRepositoryFactory`.
- Requires `PendDate` to be less than 60 days in the future and greater than yesterday (i.e., not in the past).
- When `SendtoMailId` is present and `request.ValidateConflictAccess` is true, requires every bill id in `BillsToPend` to be one the recipient has conflict access to, determined by reconstructing each `Bill` and evaluating `ClaimSecurityService.GetClaimSecurity` against the recipient's `ClaimUserSecurityAccess`.

## Context
- Namespace: `SAIF.Services.Claims.Bills.Validators`
- Assembly/package: `SAIF.Services` (packaged inside the `SAIF.SAIFCode.Core` NuGet package)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| SendPendRequestValidator | `SendPendRequestValidator(IRepositoryFactory factory, IUserProfileService profileService, IBillQueryProvider billQueryProvider, IClaimQueryProvider claimQueryProvider, IAuditNoteQueryProvider auditNoteQueryProvider, IWorkerQueryProvider workerQueryProvider, ICCClaimApiService claimApiService, IClaimDataApiClient gwClaimDataApiClient)` | Wires required/existence rules for `SendtoMailId`, a date-window rule for `PendDate`, and a conditional per-bill conflict-access check across `BillsToPend`.* |

## Behavioral notes
- Validation is enforced via FluentValidation's `AbstractValidator<T>` base.*
- The mail-id existence rule and the conflict-access rule are both gated by `When(request => request.SendtoMailId != null, ...)`.*
- The conflict-access check short-circuits to valid (`return true`) when `request.ValidateConflictAccess` is false, so the security check is opt-in per request.*
- For conflict-access validation, the rule reconstructs a `Bill` domain object per id in `BillsToPend` (via `new Bill(...)`) and evaluates it against `ClaimSecurityService.GetClaimSecurity`, so cost and outcome depend on live claim security data for each bill.*

## Constraints and usage notes
- Requires all eight constructor dependencies to be supplied via injection; several are used only inside the conflict-access branch.

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- Services/SAIF.Services/Claims/Bills/Validators/SendPendRequestValidator.cs
