Skip to main content

Entity Field Validators

docs image

Entity Field Validators

Create custom validations for certain fields on EVA

Within EVA, you can customize certain fields to adhere to specific validation criteria, such as minimum/maximum length. Essentially, if the input value for a specific field that involves a field validator is not met, an error message will be prompted, requesting the user to adhere to that criteria (see example).

The currently supported areas on EVA where entity field validators can be used include:

Authorization

To access this chapter, you need the EntityFieldValidators functionality along with the desired scope.

Permissions are managed from the Roles and Rights chapter, specifically from the functionalities card of a user's role.

The initial overview

The initial UI of the chapter provides an overview of all existing entity field validators, along with the option to create new ones. Additionally, you can click on any to view its details, edit it, or delete it.


Create entity field validators

To start the creation flow, click the '+' icon. The Create modal will always consist of four fields:

  • Entity: A dropdown list of the currently supported areas on EVA where entity field validators can be used.
  • Entity Field Name: A dropdown list of the currently supported properties that can be used for this validation feature within the specified Entity.
  • Apply for: A dropdown list of user types to whom this validation would apply.
  • Validator Type: You will be presented with two choices:
    • String Validator: Used when validation is desired based on length or the inclusion of a regex pattern (see example).
    • Default Validator: Used when validation is desired to make the selected Entity Field Name a required field by ticking the Required checkbox.

Additional fields will become visible based on the choice you've made for Validator Type.

String validator


Additional fields are made visible when the chosen Validator type is String validator:

  • Length
    • Minimum and maximum length: An integer value specifying the desired minimum and maximum length of the value for the Entity field name you've specified.
    • Fixed length: An integer value specifying the fixed length of the value for the Entity field name you've specified.
    • None: Choosing this option implies that no length validation is required.
  • Regex pattern: A string value that would then be mandatory to include as part of the value for the Entity field name you've specified (see example).


Default validator


Additional fields are made visible when the chosen Validator type is Default validator:

  • Required: A checkbox that, when ticked, makes that field mandatory to be filled in when performing the respective entity flow.


View & edit entity field validators

Your view or edit overview will differ based on the validator type chosen during the entity field validator creation flow.

Deleting an Entity Field Validator

To delete, simply click the desired Entity Field Validator, and then click the Delete button.

String validator


The view card of a string validator will display the corresponding choice made for the Length property.


The edit modal of a string validator will allow editing of the Apply for, Length, and Regex pattern properties only.


Default validator


The view card of a string validator will display the corresponding choice made for the Required checkbox, shown as either True or False.


The edit modal of a default validator will allow editing of the Apply for property and the Required checkbox.


Example

Here is an example of the behavior when configuring a scenario as follows:


Since the specified value for Entity was Pricelist, an attempt to create one from the Price lists chapter has prompted an error indicating that the value for the Backend system ID doesn't comply with the Regex pattern, as specified in the Entity field validator ([VALI]).


After including [VALI] in the value of Backend system ID, a different error is prompted indicating that the value for the Backend system ID doesn't comply with the Maximum length, which was set to 10 in the Entity field validator.


Adjusting the value of the Backend system ID to be within 10 characters would allow you to successfully create the price list without any errors coming from the Entity Field Validators feature.