mirror of
https://github.com/azaion/admin.git
synced 2026-04-22 21:46:33 +00:00
289344799e
switch to body email set
19 lines
514 B
C#
19 lines
514 B
C#
using FluentValidation;
|
|
|
|
namespace Azaion.Common.Requests;
|
|
|
|
public class SetHWRequest
|
|
{
|
|
public string Email { get; set; } = null!;
|
|
public string? Hardware { get; set; }
|
|
}
|
|
|
|
public class SetHWRequestValidator : AbstractValidator<SetHWRequest>
|
|
{
|
|
public SetHWRequestValidator()
|
|
{
|
|
RuleFor(r => r.Email).NotEmpty()
|
|
.WithErrorCode(ExceptionEnum.EmailLengthIncorrect.ToString())
|
|
.WithMessage(_ => BusinessException.GetMessage(ExceptionEnum.EmailLengthIncorrect));
|
|
}
|
|
} |