How to Configure Session Validation

Sometimes, due to unexpected validation results caused by incorrect field definitions or software bugs, one or more validation validators have to be disabled.
OpenLegacy provides out of the box default validations to ensure that the data sent and received in the session is correct.

Step-by-Step Guide

OpenLegacy defines different validation properties by the session type:

RPC Session:
    • Open application.properties/application.yml
    • Modify the following properties

      ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-validations set on/off RPC validations (by default, session validations are active)
      Each RPC field has a validator with specific validation logic by its type that can be disabled (by default, all validators are active).

      • RpcFieldGeneralValidations - provides some general validations for all rpc fields like if a field cannot be null or empty.
        to disable the validator set property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-general-validations: false


RPC Validators List:

      • RpcStringFieldTypeValidation - provides validations for String field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-string-validations: false
      • RpcNumberFieldTypeValidation - provides validations for Numeric field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-numeric-validations: false
      • RpcBooleanFieldTypeValidation - provides validations for Boolean field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-boolean-validations: false
      • RpcDateFieldTypeValidation - provides validations for Date field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-date-validations: false
      • RpcEnumFieldTypeValidation - provides validations for Enum field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-enum-validations: false .

      • RpcPartFieldTypeValidation - provides validations for RpcPart field type.
        To disable the validator, set the property to false: ol.rpc.field.validations.project.{ORCHESTRATED_KEY}.is-active-part-validations: false .

  1. Terminal/DB Sessions:

    1. Open application.properties/application.yml
    2. Modify the following properties


      ol.field.validation.enabled (default: false) - set Validation feature on / off
      ol.field.validators.disabled (default: empty) - set validator names, that should be disabled. Names must be comma separated.
      You can use such validator names for:
      B. Terminal(Screens) - ScreenFieldGeneralValidator, ScreenFieldEnumValidator, ScreenFieldNullOrEmptyValidator, ScreenFieldRegexValidator.
      C. DB - DbFieldBooleanValidator, DbFieldEnumValidator, DbFieldNullOrEmptyValidator, DbFieldNumberValidator, DbFieldRegexValidator, DbFieldStringValidator. 

None.