mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
15 lines
479 B
C#
15 lines
479 B
C#
using FluentValidation;
|
|
|
|
namespace Features.Auth.Commands.Authentication.Login;
|
|
|
|
/// <summary>Validates that <see cref="LoginCommand.Username" /> and <see cref="LoginCommand.Password" /> are present.</summary>
|
|
public class LoginValidator : AbstractValidator<LoginCommand>
|
|
{
|
|
public LoginValidator()
|
|
{
|
|
RuleFor(x => x.Username).NotEmpty().WithMessage("Username is required");
|
|
|
|
RuleFor(x => x.Password).NotEmpty().WithMessage("Password is required");
|
|
}
|
|
}
|