Files
SIG-CM2.0/src/api/SIGCM2.Application/Auth/Refresh/RefreshCommandValidator.cs

17 lines
495 B
C#
Raw Normal View History

using FluentValidation;
namespace SIGCM2.Application.Auth.Refresh;
public sealed class RefreshCommandValidator : AbstractValidator<RefreshCommand>
{
public RefreshCommandValidator()
{
RuleFor(x => x.AccessToken)
.NotEmpty().WithMessage("accessToken is required");
RuleFor(x => x.RefreshToken)
.NotEmpty().WithMessage("refreshToken is required")
.MinimumLength(20).WithMessage("refreshToken must be at least 20 characters");
}
}