20 lines
611 B
C#
20 lines
611 B
C#
using FluentValidation;
|
|
using Indotalent.Shared.Consts;
|
|
|
|
namespace Indotalent.Features.Pipeline.LeadActivity.Cqrs;
|
|
|
|
public class CreateLeadActivityValidator : AbstractValidator<CreateLeadActivityRequest>
|
|
{
|
|
public CreateLeadActivityValidator()
|
|
{
|
|
RuleFor(x => x.Summary)
|
|
.NotEmpty().WithMessage("Summary is required")
|
|
.MaximumLength(GlobalConsts.StringLengthShort);
|
|
|
|
RuleFor(x => x.LeadId)
|
|
.NotEmpty().WithMessage("Lead association is required");
|
|
|
|
RuleFor(x => x.FromDate)
|
|
.NotEmpty().WithMessage("From Date is required");
|
|
}
|
|
} |