| | | 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="ListScopeApplicationsQuery" /> (UC-17, NFR-10).</summary> |
| | | 7 | | public class ListScopeApplicationsQueryValidator : PaginatedQueryValidator<ListScopeApplicationsQuery> |
| | | 8 | | { |
| | 22 | 9 | | public ListScopeApplicationsQueryValidator() |
| | | 10 | | { |
| | | 11 | | // Matches Application.Name's own [MaxLength(200)] — a longer filter could never match a row. |
| | 22 | 12 | | RuleFor(query => query.Name) |
| | 22 | 13 | | .MaximumLength(200) |
| | 22 | 14 | | .WithMessage(PaginationMessages.FilterTooLong); |
| | 22 | 15 | | } |
| | | 16 | | } |