17 lines
459 B
C#
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.");
|
|
}
|
|
}
|