Skip to content

Commit

Permalink
Fix employee id validation
Browse files Browse the repository at this point in the history
  • Loading branch information
izzat5233 committed Jun 14, 2024
1 parent 2eafb42 commit bca51a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions RestaurantReservation.App/Validations/EmployeeDtoValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public class EmployeeDtoValidator : AbstractValidator<EmployeeDto>
{
public EmployeeDtoValidator()
{
RuleFor(e => e.EmployeeId)
.Equal(0)
.WithMessage("EmployeeId must not be set");
RuleFor(e => e.RestaurantId).GreaterThan(0);
RuleFor(e => e.FirstName)
.NotEmpty()
Expand Down

0 comments on commit bca51a1

Please sign in to comment.