EnsLib.EDI.X12.Util.Validator
abstract class EnsLib.EDI.X12.Util.Validator
Method Inventory
- CheckCompTR3Rules()
- CheckDatatype()
- CheckTR3Rules()
- EvaluateOneRule()
- Validate()
- ValidateNewComposite()
- ValidateNewElement()
- ValidateVComposite()
- ValidateVElement()
Parameters
Methods
pDocType is the DocType of the document that this segment is in pCompVal is the data value for the component within an X12 document pSeparator is the component separator for the document pOrdinal is the ordinal at which this segment appears within the given DocType pCompName is the name of the component pErrors is an array used for tracking any errors we do encounter pQuitOnError is a boolean indicating whether we should stop processing after the first error we find
pDocType is the DocType of the document that this segment is in pSegment is the segment being evaluated pOrdinal is the ordinal at which this segment appears within the given DocType pSegNum is the position at which this segment appears within the document pDataElemErrs is an array describing any errors that are found. This is used only for SNIP validation pQuitOnError is a boolean indicating whether we should stop processing once the first error has been found pSegOnly is a boolean indicating whether to only check for segment-level rules and skip over situational rules within the composite structures The returned status code message is used only for flag-style validation.
pRule is the code for the rule, as found in the X12 Syntax pValue is the segment or element value and pSeparator is either the element or component separator, depending on which unit this rule applies to pIsMissing and pExclusion are booleans to indicate which type of rule violation, if any, we found The returned value as an integer indicating which element or component the rule violation was found in or 0 if no violation was found.
Set to 1 to block documents that don't pass default validation. Default validation requires a DocType and blocks messages with any other error encountered while mapping the document's sequence of segments using the X12 schema structure specified by the document's DocType. This is equivalent to 'dm'.
All flags relating to fields/components apply only if 's'/'c' also specified (eg. if set to 'dmslt' then the length and datatype of fields will be checked, but the length and datatype of components will not be) 'd' - require DocType'm' - don't tolerate BuildMap segment mapping errors
's' - enforce segment structures (number and repetition of fields)
'c' - enforce composite structures (number of components)
'r' - enforce required fields/components being present
'u' - enforce non-use of fields/components marked 'Not Used' - Note this is not available when using a new-style only schema
'l' - enforce field/component length restrictions
't' - enforce correct datatypes used for field/component values
'v' - enforce correct code table values used where specified in the schema - Note this is not available when using a new-style only schema
'x' - enforce relational conditions where specified in the schema - Note this is not available when using a new-style only schema
'n' - perform all validation available to new style schemas. This is equivalent to 'dmscrlt'
'a' - perform all available validation. This is equivalent to 'dmscrultv'
'e' - continue validating after errors are encountered - specify this to scan the entire document and report all errors