Validating EDI Files I
Validating EDI files is extremely simple. Just set a few properties and you’re ready to go.
If you just want to validate the EDI file and not load it just set the LoadValidatedData property to false. In this case EDILightWeightDocument will be null after validation.
Prior to RDPCrystal EDI Library 4.0 a ValidationException could have been thrown if an unexpected exception occurred. Currently if an unexpected error occurs an Error object is created and returned in the Errors collection. In this case an EDIValidationMessage type of UnexpectedError or MalformedEDIFile is returned in the Error object. An exception will be thrown if the file to validate is not found or the rules file to use is not found.
Segment must also appear in the same order as they are mentioned in the implementation guide.