Cleaned code
This commit is contained in:
@@ -11,19 +11,19 @@ public class UpdateLoanDtoValidator : Validator<UpdateLoanDto>
|
||||
RuleFor(x => x.Id)
|
||||
.GreaterThan(0)
|
||||
.WithMessage("Id is invalid.");
|
||||
|
||||
|
||||
RuleFor(x => x.BookId)
|
||||
.GreaterThan(0)
|
||||
.WithMessage("Invalid book id.");
|
||||
|
||||
|
||||
RuleFor(x => x.MemberId)
|
||||
.GreaterThan(0)
|
||||
.WithMessage("Invalid member id.");
|
||||
|
||||
|
||||
RuleFor(x => x.LoanDate)
|
||||
.NotEmpty()
|
||||
.WithMessage("Date is required.");
|
||||
|
||||
|
||||
RuleFor(x => x.DueDate)
|
||||
.NotEmpty()
|
||||
.WithMessage("Due date is required.")
|
||||
|
||||
Reference in New Issue
Block a user