Skip to content

Files

Latest commit

bhavikchavdagitbook-bot
bhavikchavda
and
Oct 25, 2024
c0f6784 · Oct 25, 2024

History

History
83 lines (56 loc) · 3.64 KB

advanced.md

File metadata and controls

83 lines (56 loc) · 3.64 KB
icon description
superpowers
Validations help you to ensure that data is in the format you want them to be in. A tooltip will be shown for invalid data and you can ensure that errors get resolved before data gets submitted.

Advanced Validations

Validations

Range

Validates that field's values for Number and Double columns fall within a min and max values. Either min, max or both must be defined. Values are inclusive.

NameValueIs Required
validaterangetrue
minfalse
maxfalse
errorMessagefalse

Length

Validates that field's value for String column falls within min and max number of characters.

Either min, max or both must be defined. Values are inclusive.

NameValueIs Required
validatelengthtrue
minfalse
maxfalse
errorMessagefalse

Unique Across Multiple Fields

Validate uniqueness across multiple fields. To use it, place a unique_with validation on each field that you want to be part of the uniqueness validation, all sharing the same uniqueKey.

NameValueIs Required
validateunique_withtrue
uniqueKeyfalse
errorMessagefalse

Here is an example set of fields using unique_with validations used to validate that the combination of department code and employee Id fields are unique.

[
  {
    "key": "Department Code",
    "name": "Department Code",
    "type": "String",
    "validations": [
      {
        "validate": "unique_with",
        "uniqueKey": "Employee No"
      }
    ]
  },
  {
    "key": "Employee Id",
    "name": "Employee Id",
    "type": "Number",
    "validations": [
      {
        "validate": "unique_with",
        "uniqueKey": "Employee No"
      }
    ]
  }
]

Here is the example of unique_with validation in action,

Checking uniqueness of Employee No using unique_with validation

Adding Validations

From Platform

  1. Click on Validations while adding column or click on Edit to edit the column.\

    Mentioning Validations

  2. Assign validations as needed,\

    Assigning validations from web UI

From Code

You can check the advanced validations sections in react( #advanced-validations), angular #advanced-validations) and javascript (#advanced-validations)

{% include "../.gitbook/includes/your-feedback-is-crucial-in....md" %}