mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-07-16 09:37:23 +00:00
18 lines
562 B
C#
18 lines
562 B
C#
using FluentValidation;
|
|
|
|
namespace Features.Auth.Commands.RefreshToken;
|
|
|
|
/// <summary>
|
|
/// Validates <see cref="RefreshTokenCommand" /> instances before they are processed.
|
|
/// </summary>
|
|
public class RefreshTokenValidator : AbstractValidator<RefreshTokenCommand>
|
|
{
|
|
/// <summary>
|
|
/// Configures a validation rule requiring <see cref="RefreshTokenCommand.RefreshToken" /> to be non-empty.
|
|
/// </summary>
|
|
public RefreshTokenValidator()
|
|
{
|
|
RuleFor(x => x.RefreshToken).NotEmpty().WithMessage("Refresh token is required");
|
|
}
|
|
}
|