Initial commit
This commit is contained in:
19
MealPlan.Api/Validators/LoginRequestValidator.cs
Normal file
19
MealPlan.Api/Validators/LoginRequestValidator.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user