Skip to end of metadata
Go to start of metadata

Spis treści

1. Validators definition

Validator is a component used to check the correctness of a form and related elements (eg. documents or comments). It is called by pressing the acceptance button and performed before variable setting classes.

2. Validator adding

To add a validator go to the acceptance button settings.

 

Develop the tab "Validators"

 

 

You can add validator by clicking the gear:

 

 

From the auxiliary window select the component that interests you.

 

 

After selecting the component you configure it. Details of component action and its configuration can be checked on the page with the documentation of a specific component.

 

 

 

3. Component parameters

More informaton about the validator parameters are on a separate page: Component parameters

4. Validator editing

To edit the validator in the appropriate tab of the acceptance button, click the windows next to the validator.

5. Order of calling validators

If even one error is returned during the acceptance process, the task will not be accepted, and the validation errors will be indicated on the form in the following order:
  1.  Required variables (if the "Check form" option is selected in the definition of the accept button).
  2. Validator for a variable - A message is added under the variable on the form (except for tabular variables).
  3. Required array variables (if the "Check form" option is selected in the definition of the accept button).
  4. Validator for an array variable - The indicated cell in the table is marked in red until the value is changed.
  5. Global validators (not related to any specific variable) - global validators without confirmation that failed are displayed in one window with all messages.
  6. Validators with confirmation - all incorrect validators with confirmation are collected and displayed as separate windows with a message, where they must be confirmed one by one in order to proceed accepting the task. Cancellation of any confirmation cancels all subsequent confirmations, which also terminates the acceptance.

6. Audits

Below version 4.0.42, the "Activity acceptance" audit is always added in case of validation failure.

4.0.42+

If an error is returned from any of the validators, a failure audit is added under the name "Activity validation". However, if during the acceptance the task returns an error not related to validation, an audit called "Aactivity acceptance" is added.
 

Examples:

  • Validation failure without confirmation (required, for variables, global) - "Activity validation" audit is added with failure.
  • Validation error with confirmation, click No - "Activity validation" audit is added with failure.
  • Validation error with confirmation, click Yes - "Activity validation" audit with failure and "Activity acceptance" audit with success are added.
  • Acceptance passed (all validations pass) - "Activity acceptance" audit is added with success.
  • Validation error with confirmation, click No, accept again, validation error with confirmation, click Yes - three audits are added: "Activity validation" with failure, "Activity validation" with failure and "Activity acceptance" with success.
  • Acceptance with automatic transition, where the application returned an error - "Activity acceptance" with failure.
  • Error of several validations with confirmation, confirm in turn Yes, and then click on the next No - "Activity validation" audit is added with failure.

 

  • No labels