2024-03-28 19:17:46 +01:00
|
|
|
|
using FluentValidation;
|
2024-04-27 22:36:16 +02:00
|
|
|
|
using WatchIt.Common.Model.Accounts;
|
2024-03-28 19:17:46 +01:00
|
|
|
|
|
2024-04-27 22:36:16 +02:00
|
|
|
|
namespace WatchIt.WebAPI.Validators.Accounts;
|
|
|
|
|
|
|
|
|
|
|
|
public class AuthenticateRequestValidator : AbstractValidator<AuthenticateRequest>
|
2024-03-28 19:17:46 +01:00
|
|
|
|
{
|
2024-04-27 22:36:16 +02:00
|
|
|
|
public AuthenticateRequestValidator()
|
2024-03-28 19:17:46 +01:00
|
|
|
|
{
|
2024-04-27 22:36:16 +02:00
|
|
|
|
RuleFor(x => x.UsernameOrEmail).NotEmpty();
|
|
|
|
|
|
RuleFor(x => x.Password).NotEmpty();
|
2024-03-28 19:17:46 +01:00
|
|
|
|
}
|
2024-04-27 22:36:16 +02:00
|
|
|
|
}
|