The issue to look for
Applying one punctuation-stripping rule to every identifier column can damage manufacturer part numbers. A hyphen can be meaningful in an MPN even when it is invalid in a numeric GTIN.
What this check can tell you
One downloadable row exercises both paths: the GTIN stays invalid while the MPN becomes Ab-12 Rev.B without losing its case or punctuation.
A transparent review
- Confirm which column is a GTIN and which is an MPN before normalization.
- Run the fixture and inspect the unchanged 012-345-678905 value.
- Compare the MPN before/after: only outer and repeated whitespace changes.
- Correct GTIN punctuation only against a documented source rule; retain the original alongside any reviewed correction.
How to read the result
- The numeric validator does not delete interior spaces or hyphens. This avoids presenting an aggressively reformatted identifier as a verified match.
- For MPNs, the app trims the ends and collapses repeated whitespace. It does not uppercase, lowercase, or remove punctuation. Duplicate matching is a separate review mechanism and should not be assumed to merge every similarly formatted MPN.
Limits to keep in view
- A normalized MPN is not checked against a manufacturer database.
- GTIN punctuation cleanup is not automatic.
- A repeated identifier can represent different supplier rows or packs that need human review.
Synthetic fixture: synthetic-punctuation.csv
This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.
Input
UPC,MPN,SKU 012-345-678905," Ab-12 Rev.B ",PUNC-1
Output
{
"checks": {
"invalidIdentifiers": 1,
"repairCount": 1
},
"cleanedRows": [
{
"UPC": "012-345-678905",
"MPN": "Ab-12 Rev.B",
"SKU": "PUNC-1"
}
]
}Observation: The hyphenated GTIN stays invalid. MPN whitespace collapses to Ab-12 Rev.B while case, the hyphen and the period remain.
Download synthetic fixture