The new validation method is designed to give users more granularity and detailed results. Here are details about the API changes:
The API call is an overload of ValidateAll(ValidationOptions), as opposed to ValidateAll() without any parameter that returns combined validation exceptions as you’ve seen before, it is there for backward compatibility and will be replaced in the next major version.
The new ValidationOptions parameter allows you to specify refined checks of the attributes based on the VR type as defined in the DICOM Value Representations. These individual checks are now of type boolean to easily enable and disable them as necessary.
- DataLength does a data length compatible check against the rules for VR as specified in the Standard (Length of Value column).
- Detailed does a character repertoire check as specified in the Standard (Character Repertoire column). As the name suggests this performs extensive checks, including parsing and conversion if needed to produce appropriate validation exceptions.
- ForQuery is for Date Time range matching in the context of a Query and is similar to what we had in ValidationTypes.
- CharacterSet same as before, checks for Character Set if Non-ASCII characters are present by checking (0008,0005) Specific Character Set attribute.
- PrivateAttributes and PrivateSequences are to specify whether we try to validate any private data if we can parse them.
The first 2 checks are enabled by Default
There is no NONE type any more because you have to explicitly invoke Validation if you need it.
There will be some remnants of the old validation code (for backward compatibility reasons) in V8 which will be completely removed in the next major version and this new Validation method will be supported in all future releases.