Data validation at action invocation
The validate
action default attribute controls field validation when
an action is fired.
When using the UNBUFFERED
mode of interactive instructions
such asINPUT
or DIALOG
, if the user triggers
an action, the current field data is checked and loaded in the target variable
bound to the form field.
For example, if the user types a wrong date (or only a part of a date) in a
field using a DATE
variable and then clicks on a button to
invoke an action, the runtime system will display an invalid input error and
will not execute the ON ACTION
block corresponding to the button.
To prevent data validation for some actions, use the validate
action default
attribute. This attribute instructs the runtime not to copy the input buffer text into
the program variable (requiring input buffer text to match the target data type).
ACTION DEFAULTS
...
ACTION zoom ( ... VALIDATE = NO ... )
...
END
This is especially needed in DIALOG
instructions; in singular dialogs
like INPUT
, predefined actions like cancel do not validate the current
field value when UNBUFFERED
mode is used.
The validate
action default attribute can be set in the global action
default file, or at the form level, with the VALIDATE
attribute in a
line of the ACTION DEFAULTS
section.