This commit is contained in:
2026-07-14 19:11:58 +02:00
parent cb7aa32567
commit f101ce69a0
4 changed files with 10 additions and 13 deletions
@@ -16,10 +16,10 @@ public sealed class CreateUserRequestValidator : AbstractValidator<CreateUserReq
RuleFor(x => x.FirstName)
.MaximumLength(48)
.When(x => x.FirstName is not null);
.When(x => !string.IsNullOrWhiteSpace(x.FirstName));
RuleFor(x => x.SecondName)
.MaximumLength(48)
.When(x => x.SecondName is not null);
.When(x => !string.IsNullOrWhiteSpace(x.SecondName));
}
}