Value Representation (VR) errors
Flag tag values that violate their Value Representation rules.
Problem
DICOM tags must conform to their declared Value Representation (VR): a LO string can’t exceed 64 characters, a DA date must be 8 digits (YYYYMMDD), an IS integer can’t contain decimals, a DS decimal string can’t contain letters, and a UI UID can only contain digits and dots. When editing tags in the UI, VR format violations must be caught before saving to prevent writing invalid DICOM.
VR Validation Rules
| VR Type | Example Tag | Valid | Invalid (Rejected) | Error Message |
|---|---|---|---|---|
| LO (Long String) | Patient ID (0010,0020) | “ABC123” | 65-char string | VR validation error |
| PN (Person Name) | Patient Name (0010,0010) | “SMITH^JOHN” | 65-char string | VR validation error |
| DS (Decimal String) | Slice Thickness (0018,0050) | “3.5" | "three_point_five” | VR validation error |
| IS (Integer String) | Series Number (0020,0011) | “45" | "10.5”, “SeriesOne" | "Must be a whole number (no decimals)” / “Must be a number” |
| DA (Date) | Study Date (0008,0020) | “20260607" | "2026/06/07”, “INVALID_DATE" | "Must be exactly 8 digits: YYYYMMDD” |
| TM (Time) | Study Time (0008,0030) | “231800" | "12 o-clock” | VR validation error |
| UI (UID) | SOP Class UID (0008,0016) | “1.2.840.10008.5.1.4.1.1.2" | "1.2.840.10008.abc.1" | "UID: digits and dots only (max 64)“ |
Steps
-
Open a file (⌘O) and switch to Edit mode (Ctrl+2 / ⌘2 in the desktop app).
-
Filter for the tag you want to test, double-click to open the edit modal.
-
Enter an invalid value according to the table above.
-
Verify the save button is disabled and a red validation error message appears.
-
Cancel the modal to leave the original value intact.
Result
Invalid values are caught before saving: Save is disabled, a red message explains the expected format, and canceling preserves the original value.