NoteEditValidator¶
A FluentValidation AbstractValidator<NoteEdit> used by SAIF.Services.Groups.Notes.NoteService (via IValidationService) to validate group-note edits before they are persisted. It has no injected dependencies.
Purpose¶
- Requires a category code on every group-note edit.
- Requires a type code on every group-note edit.
Context¶
- Namespace:
SAIF.Services.Groups.Notes - Assembly/package:
SAIF.Services(packaged inside theSAIF.SAIFCode.CoreNuGet package)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| NoteEditValidator() | public NoteEditValidator() |
Registers RuleFor(n => n.CategoryCode).NotNull() ("Error: Category is required.") and RuleFor(n => n.TypeCode).NotNull() ("Error: Type is required."). |
Behavioral notes¶
- Text-length/required-text rules are commented out in source, so note text content is not validated by this validator; text validation for group notes is instead performed separately in
NoteService.ValidateNoteText.
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/Groups/Notes/NoteEditValidator.cs