Home > Class Reference > ENSLIB namespace > EnsLib.EDI.X12.Util.Validator


abstract class EnsLib.EDI.X12.Util.Validator

Method Inventory


parameter DOMAIN = Ensemble;
Use our own domain for localization


classmethod CheckDatatype(pValue, pDatatype) as %Boolean
classmethod Validate(pDoc As EnsLib.EDI.X12.Document, pValSpec As %String = 1, pValidateChildren As %Boolean = 1) as %Status
pDoc is the X12 document to validate. pValSpec is a string specifying types of Validation to perform

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
'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

classmethod ValidateNewComposite(pValue, pSep, pValSpec, pQuitOnError, pStructure, pErrors) as %Boolean
classmethod ValidateNewElement(pValue, pValSpec, pInfo, pQuitOnError, pErrors) as %Boolean
classmethod ValidateVComposite(pValue, pSep, pValSpec, pQuitOnError, pDocType, pOrdinal, pErrors) as %Boolean
classmethod ValidateVElement(pValue, pValSpec, pInfo, pQuitOnError, pDocType, pOrdinal, pErrors) as %Boolean