| | | 1 | | using FluentValidation; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Heimdall.Command.Input.Validation; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Shape validation for <see cref="CreateUserCommand" /> (UC-06 path a, AF-06d). Scope existence, |
| | | 7 | | /// ownership, and email uniqueness are enforced by the handler. |
| | | 8 | | /// </summary> |
| | | 9 | | public class CreateUserCommandValidator : AbstractValidator<CreateUserCommand> |
| | | 10 | | { |
| | 12 | 11 | | public CreateUserCommandValidator() |
| | | 12 | | { |
| | 12 | 13 | | RuleFor(command => command.Name).PersonName(); |
| | 12 | 14 | | RuleFor(command => command.Email).PersonEmail(); |
| | 12 | 15 | | RuleFor(command => command.Password).PersonPassword(); |
| | 12 | 16 | | } |
| | | 17 | | } |