20 lines
420 B
C#
20 lines
420 B
C#
using FluentValidation;
|
|
using MealPlan.Api.DTOs.Auth;
|
|
|
|
namespace MealPlan.Api.Validators;
|
|
|
|
public class LoginRequestValidator : AbstractValidator<LoginRequestDto>
|
|
{
|
|
public LoginRequestValidator()
|
|
{
|
|
RuleFor(x => x.Email)
|
|
.NotEmpty()
|
|
.EmailAddress()
|
|
.MaximumLength(256);
|
|
|
|
RuleFor(x => x.Password)
|
|
.NotEmpty()
|
|
.MaximumLength(256);
|
|
}
|
|
}
|