Validating Strings

Index

    Validating Strings

    EDIValidator allows you to validate EDI files from your file system using the EDIFile property as well as from a string of EDI text using the EDIDataString property. You can create an entire EDI string containing EDI data from your applications and pass it into the EDIValidator’s EDIDataString property. Validation will continue as normal after calling the Validate() method.

    Example

    // Create a new instance of EDIValidator
    EDIValidator validator = new EDIValidator();

    // Set the EDI rules file
    validator.EDIRulesFile = “C:\\EDIFile.Rules”;

    // Set the EDI file to validate
    validator.EDIDataString= “SEG*12*122*~SEG2*7*2~”;

    // Validate
    validator.Validate();

     

    in EDI Validator
    Did this article answer your question?