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

# RegenerateRequestValidator

Validates a `RegenerateRequest`, which resubmits one or more previously-processed bills, by requiring note text (bounded to 600 characters) and confirming every id in `BillsToRegenerate` corresponds to a bill whose status is completed. That check constructs a full `Bill` domain object per id — via seven injected data-access and API dependencies (`IRepositoryFactory`, `IUserProfileService`, `IBillQueryProvider`, `IClaimQueryProvider`, `IWorkerQueryProvider`, `IAuditNoteQueryProvider`, `ICCClaimApiService`, `IClaimDataApiClient`) — and inspects its `Status.IsCompleted` flag, so validation is only satisfied when every requested bill has finished processing.

## Purpose
- Requires every id in `BillsToRegenerate` to correspond to a `Bill` whose `Status.IsCompleted` is true, by reconstructing each `Bill` domain object from the injected dependencies and checking its status.
- Requires `NoteText` to be non-empty and at most 600 characters.

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

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| RegenerateRequestValidator | `RegenerateRequestValidator(IRepositoryFactory factory, IUserProfileService profileService, IBillQueryProvider billQueryProvider, IClaimQueryProvider claimQueryProvider, IWorkerQueryProvider workerQueryProvider, IAuditNoteQueryProvider auditNoteQueryProvider, ICCClaimApiService claimApiService, IClaimDataApiClient gwClaimDataApiClient)` | Wires a `Must` rule requiring every `BillsToRegenerate` id to map to a completed-status `Bill`, plus required/length rules for `NoteText`.* |

## Behavioral notes
- Validation is enforced via FluentValidation's `AbstractValidator<T>` base.*
- The `BillsToRegenerate` check materializes a `Bill` domain object per id (via `new Bill(...)`) using all eight constructor dependencies, so the rule's cost scales with the number of ids and depends on live data across bill, claim, worker, audit-note, and Guidewire claim API sources.*

## Constraints and usage notes
- Requires all eight constructor dependencies to be supplied; the validator cannot construct `Bill` instances (and therefore cannot validate) without them.

> **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/RegenerateRequestValidator.cs
