initial commit

This commit is contained in:
2026-07-21 14:08:10 +07:00
commit f7cf118326
533 changed files with 41762 additions and 0 deletions
@@ -0,0 +1,27 @@
using FluentValidation;
using Indotalent.Shared.Consts;
namespace Indotalent.Features.Organization.Branch.Cqrs;
public class CreateBranchValidator : AbstractValidator<CreateBranchRequest>
{
public CreateBranchValidator()
{
RuleFor(x => x.Code)
.NotEmpty().WithMessage("Branch Code is required")
.MaximumLength(GlobalConsts.StringLengthShort);
RuleFor(x => x.Name)
.NotEmpty().WithMessage("Branch Name is required")
.MaximumLength(GlobalConsts.StringLengthShort);
RuleFor(x => x.City)
.NotEmpty().WithMessage("City is required");
RuleFor(x => x.StreetAddress)
.NotEmpty().WithMessage("Street Address is required");
RuleFor(x => x.Email)
.EmailAddress().When(x => !string.IsNullOrEmpty(x.Email));
}
}