initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace Indotalent.Features.Performance.Appraisal.Cqrs;
|
||||
|
||||
public class CreateAppraisalValidator : AbstractValidator<CreateAppraisalRequest>
|
||||
{
|
||||
public CreateAppraisalValidator()
|
||||
{
|
||||
RuleFor(x => x.EmployeeId).NotEmpty().WithMessage("Employee is required");
|
||||
RuleFor(x => x.AppraisalType).NotEmpty().WithMessage("Appraisal Type is required");
|
||||
RuleFor(x => x.EffectiveDate).NotEmpty().WithMessage("Effective Date is required");
|
||||
RuleFor(x => x.CurrentSalary).GreaterThanOrEqualTo(0);
|
||||
RuleFor(x => x.IncrementPercentage).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user