indice-co / indice-co/EDI.Net

EDIValue(X(60)) is not limiting the string max length when serializing

Open
#198 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C#
Stars
490
Forks
173
PR merge metrics
No merged PRs in 30d

Description

Hi,

I was serializing a file and I realized that EDIValue(X(60)) is not limiting the string max length when serializing despite the fact that I indicated 60 in the attribute.

```c#
[EdiValue("X(60)", Path = "POD/2", Description = "POD03 - Proof of delivery name / Received by")]
public string ProofOfDeliveryName { get; set; }
```

Is there any reason why Edivalue attribute doesn’t validate string max length?

Contributor guide

No contributing guide indexed for this repository

Research direction

Use the provided C# model with EDIValue("X(60)") as the reproduction and trace how the attribute is handled during serialization. Add coverage for a value exceeding 60 characters; done means serialization enforces the declared maximum length without breaking the existing EDI behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.