| | | 1 | | using ArturRios.Heimdall.Shared.Messages; |
| | | 2 | | using FluentValidation; |
| | | 3 | | |
| | | 4 | | namespace ArturRios.Heimdall.Command.Input.Validation; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Input validation for <see cref="SetGoogleSignInCommand" /> (UC-24). Only checks the shape of |
| | | 8 | | /// the request — that the caller actually said which value to set; the business rules that |
| | | 9 | | /// require data access (the scope exists, the actor owns it) are enforced by the handler. |
| | | 10 | | /// </summary> |
| | | 11 | | public class SetGoogleSignInCommandValidator : AbstractValidator<SetGoogleSignInCommand> |
| | | 12 | | { |
| | 12 | 13 | | public SetGoogleSignInCommandValidator() |
| | | 14 | | { |
| | 12 | 15 | | RuleFor(command => command.Enabled) |
| | 12 | 16 | | .NotNull() |
| | 12 | 17 | | .WithMessage(ScopeMessages.EnabledRequired); |
| | 12 | 18 | | } |
| | | 19 | | } |