initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using FluentValidation;
|
||||
using Indotalent.Shared.Consts;
|
||||
|
||||
namespace Indotalent.Features.Performance.Evaluation.Cqrs;
|
||||
|
||||
public class CreateEvaluationValidator : AbstractValidator<CreateEvaluationRequest>
|
||||
{
|
||||
public CreateEvaluationValidator()
|
||||
{
|
||||
RuleFor(x => x.EmployeeId)
|
||||
.NotEmpty().WithMessage("Employee is required");
|
||||
|
||||
RuleFor(x => x.Period)
|
||||
.NotEmpty().WithMessage("Evaluation Period is required")
|
||||
.MaximumLength(GlobalConsts.StringLengthShort);
|
||||
|
||||
RuleFor(x => x.FinalScore)
|
||||
.NotEmpty().WithMessage("Final Score is required");
|
||||
|
||||
RuleFor(x => x.EvaluatorId)
|
||||
.NotEmpty().WithMessage("Evaluator is required");
|
||||
|
||||
RuleFor(x => x.EvaluationDate)
|
||||
.NotEmpty().WithMessage("Evaluation Date is required");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user