autobus-api_old/AutobusApi.Application/Identity/Queries/Login/LoginQueryValidator.cs
2023-11-15 19:00:34 +02:00

17 lines
459 B
C#

using FluentValidation;
namespace AutobusApi.Application.Identity.Queries.Login;
public class LoginQueryValidator : AbstractValidator<LoginQuery>
{
public LoginQueryValidator()
{
RuleFor(v => v.Email)
.NotEmpty().WithMessage("Email address is required.")
.EmailAddress().WithMessage("Email address is invalid.");
RuleFor(v => v.Password)
.NotEmpty().WithMessage("Password is required.");
}
}