NoteDeleteRequestValidator¶
Validates a NoteDeleteRequest by requiring a non-empty Id that resolves to an existing audit note, checked via IBillQueryProvider.AuditQueries.NoteQueries.GetAuditNote. This prevents delete operations from targeting a note id that does not exist in the audit note store.
Purpose¶
- Requires
Idto be non-null and non-empty. - Requires
Idto resolve to an existing audit note by verifying thatprovider.AuditQueries.NoteQueries.GetAuditNote(x)does not return a null result.
Context¶
- Namespace:
SAIF.Services.Claims.Bills.Validators - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| NoteDeleteRequestValidator | NoteDeleteRequestValidator(IBillQueryProvider provider) |
Wires a required-value rule plus a Must check confirming Id resolves to an existing audit note via provider.AuditQueries.NoteQueries.GetAuditNote.* |
Behavioral notes¶
- Validation is enforced via FluentValidation's
AbstractValidator<T>base.* - The existence check is a live lookup against
IBillQueryProvider's audit note queries, so the rule's outcome depends on external data at validation time rather than the request's own field alone.*
Constraints and usage notes¶
- Requires an
IBillQueryProviderimplementation to be supplied via constructor injection.
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/NoteDeleteRequestValidator.cs