Validating the Payment Fields Operation
The MICR prefix is set prior to calling the MICR validation node. If a MICR prefix is passed in, the associated validation rules are retrieved from the MICR validation table. Based on the settings from the table, various validity checks are made on selected MICR fields. If the MICR prefix is not set, the MICR validation node returns a failure to the workflow.
For each MICR field, the following steps are performed:
Note: If a validation error is detected, the associated error
code is added to the set of validation results returned in ibmNprValidationResults.
The ibmNprValidXXX flag for the field is set to false, ibmNprValidationError
is set to true, and ibmNprRepairable is set to true, if it was not
previously set to false. XXX represents the
validation type.
- If ibmIntRequired is set to Y and the MICR field's value is blank, add ibmValMissingError to ibmNprValidationResults.
- If ibmIntRequired or ibmIntVerify is set to Y:
- Substitute all of the special characters, ibmValSpecialCharAllowed, with the corresponding substitutions, ibmValSpecialCharSubstitutions.
- Check the digits of the MICR field value.
- If the MICR field value contains any invalid characters, add ibmValDigitError
to ibmNprValidationResults.
Note:
- The values in a MICR field marked as numeric are considered valid if they contain the digits 0 through 9. If the dash character is specified as a special character, valid numeric MICR field values may also contain a dash.
- Non-numeric MICR field values are considered valid if they contain the digits 0 through 9 or any of the specified special characters.
- If ibmIntRequired or ibmIntVerify is set to Y and a format, ibmValFormat, is specified, check the format of the MICR field value. If the format does not match the specified pattern, add ibmFormatErrorcode to ibmNprValidationResults.
- If ibmIntRequired or ibmIntVerify is set to Y and a minimum length, ibmIntMin, is specified, check the length of the MICR field value. If the MICR field value length is less than the specified minimum length, add ibmValLengthError to ibmNprValidationResults.
- If ibmIntRequired or ibmIntVerify is set to Y and a maximum length, ibmIntMax, is specified, check the length of the MICR field value. If the MICR field value length is greater than the specified maximum length, add ibmValLengthError to ibmNprValidationResults.
- If ibmIntRequired or ibmIntVerify is set to Y and a values 1 value,
ibmValValues1, is specified:
- Substitute all of the special characters, ibmValSpecialCharAllowed, with the corresponding substitutions, ibmValSpecialCharSubstitutions.
- Check that the MICR field value either equals one of the specified values or falls within a range of specified values.
- If the MICR field value does not equal a specified value or fall within the range, add
ibmValue1ErrorCode to ibmNprValidationResults. Note: The values in a MICR field marked as numeric are compared as numeric. Values in a non-numeric MICR field are compared as strings.
- If ibmIntRequired or ibmIntVerify is set to Y and at least one modulus routine is specified in
ibmSetModRoutines:
- Substitute all of the special characters, ibmValSpecialCharAllowed, with the corresponding substitutions, ibmValSpecialCharSubstitutions.
- Perform the modulus operation for the first value specified in ibmSetModRoutines. The modulus routine ID of the operation is used to retrieve the parameters from the EXT_MOD_ROUTINES database table.
- If the modulus operation fails, take one of the following actions:
- If there are no additional modulus routine values specified in ibmSetModRoutines, add ibmValModError to ibmNprValidationResults.
- If there are additional modulus routine values specified in ibmSetModRoutines, perform the
following for each routine:
- Perform the substitution again.
- Perform the modulus operation. The modulus routine ID of the operation is used to retrieve the parameters from the EXT_MOD_ROUTINES database table.
- If the modulus operation
- fails, add ibmValModError to ibmNprValidationResults
- succeeds, the value in the field is valid and modulus validation is successful. No additional modulus operations are performed on this field.
- If a mutual exclusion value, ibmValMutualExcl, is specified, perform
the check. Add ibmValMutualError to ibmNprValidationResults when the
following occurs:
- The first MICR field in ibmValMutualExcl has a value, and one or more of the subsequent fields also have values.
- All of the MICR fields selected in ibmValMutualExcl do not have values.
Note: ibmValMutualExcl contains a list of one or more field numbers (1-7), separated by commas, that should be included in the mutual exclusion check. Leaving ibmValMutualExcl blank disables the check. - If a mutual inclusion value, ibmValMutualIncl, is specified, check
that one or more of the selected MICR fields have values. If all of
the MICR fields identified by ibmValMutualIncl do not have values,
add ibmValMutualError to ibmNprValidationResults.
Note: ibmValMutualIncl contains a list of one or more field numbers (1-7), separated by commas, that should be included in the mutual inclusion check. Leaving ibmValMutualIncl blank disables the check.
- If ibmIntTreasury is set to Y and the field index is 2 or 102, perform the treasury check. If it returns with a validation error, add ibmValTreasuryError to ibmNprValidationResults.