This commit is contained in:
mmrbnjd
2024-11-29 18:52:58 +03:30
parent fc2d774506
commit 384bcbc20f
6 changed files with 43 additions and 25 deletions

View File

@@ -65,8 +65,8 @@ namespace Back.Validations
RuleFor(r => r.Item2.BranchID)
.Custom((model, context) =>
{
if (!string.IsNullOrEmpty(model) && (model.Length > 10))
context.AddFailure("تعداد کارکتر کد شعبه صحبح نمی باشد");
if (!string.IsNullOrEmpty(model) && (model.Length !=4))
context.AddFailure("مقدار کد شعبه یاید 4عددی باشد");
});
RuleFor(r => r.Item2.ZipCode)
.Custom((model, context) =>