classlib/ExpenseTracker.Application/Authentication/Queries/Login/LoginQueryValidator.cs
2024-08-07 21:12:02 +03:00

17 lines
473 B
C#

using FluentValidation;
namespace ExpenseTracker.Application.Authentication.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.");
}
}