Syntax validation in SWIFT MT type trees

The syntactic definition covers the following elements:

  • Blocks 1, 2, 3, and 5 - envelope validation:
    • Check the block structure.
    • Ensure that only permitted fields are present, and in the correct order.
  • Block 4 - message body validation:
    • Make certain that only permitted sequences and fields are present.
    • Check the sequence structure and the order of sequences.
    • Check the order of fields within the message or within the sequence.
    • Check for the allowed format options of a field (for example, 98A and 98C).
    • Check the structure of sub-fields with a field.
    • Check for valid qualifiers of a field.
    • Check the cardinality of qualifiers, fields, and sequences (that is, optional, mandatory, repeating).
  • Data size
    • For each field, or subfield, check the minimum and maximum size restrictions.
  • Data type
    • For each field, or subfield, check data type (date, integer, decimal, text). For text fields, character set validation is not performed.
  • Code words
    • For each field, or subfield, check for a valid code word. Code words are only validated when an error code is quoted in the SWIFT User Handbook.