| | | 1 | | using ArturRios.Heimdall.Shared.Messages; |
| | | 2 | | using FluentValidation; |
| | | 3 | | |
| | | 4 | | namespace ArturRios.Heimdall.Query.Input.Validation; |
| | | 5 | | |
| | | 6 | | /// <summary>Input validation for <see cref="ListSystemAdminsQuery" /> (UC-07 read e, NFR-10).</summary> |
| | | 7 | | public class ListSystemAdminsQueryValidator : PaginatedQueryValidator<ListSystemAdminsQuery> |
| | | 8 | | { |
| | 19 | 9 | | public ListSystemAdminsQueryValidator() |
| | | 10 | | { |
| | | 11 | | // Matches Person.Name/Email's own [MaxLength] — a longer filter could never match a row. |
| | 19 | 12 | | RuleFor(query => query.Name) |
| | 19 | 13 | | .MaximumLength(200) |
| | 19 | 14 | | .WithMessage(PaginationMessages.FilterTooLong); |
| | | 15 | | |
| | 19 | 16 | | RuleFor(query => query.Email) |
| | 19 | 17 | | .MaximumLength(256) |
| | 19 | 18 | | .WithMessage(PaginationMessages.FilterTooLong); |
| | 19 | 19 | | } |
| | | 20 | | } |