feat: Add new unit tests, domain exceptions, documentation, and various build artifacts across multiple services.

This commit is contained in:
Ho Ngoc Hai
2026-01-17 23:04:15 +07:00
parent 29a70f5b64
commit 19c0acfe0f
321 changed files with 18414 additions and 1479 deletions

View File

@@ -0,0 +1,29 @@
using FluentValidation;
using MyService.API.Application.Commands;
namespace MyService.API.Application.Validations;
/// <summary>
/// EN: Validator for UpdateSampleCommand.
/// VI: Validator cho UpdateSampleCommand.
/// </summary>
public class UpdateSampleCommandValidator : AbstractValidator<UpdateSampleCommand>
{
public UpdateSampleCommandValidator()
{
RuleFor(x => x.SampleId)
.NotEmpty()
.WithMessage("Sample ID is required / ID sample là bắt buộc");
RuleFor(x => x.Name)
.NotEmpty()
.WithMessage("Name is required / Tên là bắt buộc")
.MaximumLength(200)
.WithMessage("Name must be less than 200 characters / Tên phải ít hơn 200 ký tự");
RuleFor(x => x.Description)
.MaximumLength(1000)
.WithMessage("Description must be less than 1000 characters / Mô tả phải ít hơn 1000 ký tự")
.When(x => x.Description != null);
}
}