Fixed error with designation name
This commit is contained in:
@@ -38,9 +38,9 @@ public class GetUserDtoValidator : Validator<GetUserDto>
|
||||
.MinimumLength(2)
|
||||
.WithMessage("Username must exceed 2 characters");
|
||||
|
||||
When(x => x.DesignationId is not null, () =>
|
||||
When(x => x.DesignationName is not null, () =>
|
||||
{
|
||||
RuleFor(x => x.DesignationId)
|
||||
RuleFor(x => x.DesignationName)
|
||||
.NotEmpty()
|
||||
.WithMessage("DesignationId is required");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user