Validating EDI Files II
Validating EDI files is extremely simple. Just set a few properties and you’re ready to go.
You can also validate an EDILightWeightDocument using this method. If you just want to validate the EDI file and not load it just set the LoadValidatedData property to false. In this case EDIDocument property of EDIValidator 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.