Kofax Capture Validation Script field is not executing default behavior

Following information taken from: https://knowledge.kofax.com/Capture/Kofax_Capture/Reference/Validation_script_field_is_not_executing_default_behavior

Issue


I am implementing a Field's Postprocessing event in a Validation script. This is causing certain default behaviors, such as Field Length checks, etc., to not occur when in the validation module.

Cause


Implementing a Field's PostProcessing event in a Validation script overrides the default behavior of the Field.

Solution


Add a call to the DefaultFieldPostProcessing() method in the FieldPostProcessing event handler to perform the default post-field processing of the current index field.


The current index field is validated based on its data type and a ValidationErrorException is thrown if the validation fails.


Example:


Private Sub Name1_FieldPostProcessing(sender As Object, e As PostFieldEventArgs) Handles Name1.FieldPostProcessing

    Name1.DefaultFieldPostProcessing()

End Sub