Generator Changes at 11/17/2025 11:53:47 PM +03:30

This commit is contained in:
masoodafar-web
2025-11-17 23:57:51 +03:30
parent da07a3da38
commit dba8aecc97
50 changed files with 978 additions and 19 deletions

View File

@@ -7,6 +7,8 @@ public class CreateNewCategoryCommandValidator : AbstractValidator<CreateNewCate
.NotEmpty();
RuleFor(model => model.Title)
.NotEmpty();
RuleFor(model => model.IsActive)
.NotNull();
RuleFor(model => model.SortOrder)
.NotNull();
}
@@ -18,4 +20,3 @@ public class CreateNewCategoryCommandValidator : AbstractValidator<CreateNewCate
return result.Errors.Select(e => e.ErrorMessage);
};
}

View File

@@ -9,6 +9,8 @@ public class UpdateCategoryCommandValidator : AbstractValidator<UpdateCategoryCo
.NotEmpty();
RuleFor(model => model.Title)
.NotEmpty();
RuleFor(model => model.IsActive)
.NotNull();
RuleFor(model => model.SortOrder)
.NotNull();
}
@@ -20,4 +22,3 @@ public class UpdateCategoryCommandValidator : AbstractValidator<UpdateCategoryCo
return result.Errors.Select(e => e.ErrorMessage);
};
}