Get in touch
Get in touch

Custom validation rules

The custom validation rules are a configurable set of rules which can be applied to the majority of available property data types, providing an additional layer to ensure the logical integrity of your data. Validation rules can be a critical tool when using Data Graphs for master-data management or reference-data management.

1. Custom Validation Rules

Basic Rules

  • Custom RegEx - validates strings agains any valid regular expression. Can be applied to both keyword and text property data types.
  • Min Characters - validates total number of characters, incl. whitespace, in a string against a specified number. The number of characters has to be greather than or equal to the specified number. Can be applied to both keyword and text property data types.
  • Max Characters - validates total number of characters, incl. whitespace, in a string against a specified number. The number of characters has to be less than or equal to the specified number. Can be applied to both keyword and text property data types.
  • Min Words - validates the total number of words in a string against a specified number. The number of words has to be greather than or equal to the specified number. Can be applied to text property data type.
  • Max Words - validates the total number of words in a string against a specified number. The number of words has to be less than or equal to the specified number. Can be applied to text property data type.
  • Min Value - validates numeric input against a specified value. The input number has to be greather than or equal to the specified value. Can be applied to integer, decimal, latitude and longitude property data types.
  • Max Value - validates numeric input against a specified value. The input number has to be less than or equal to the specified value. Can be applied to integer, decimal, latitude and longitude property data types.
  • After Date - validates input date against a specified date. The input date has to be AFTER the specified date. Can be applied to date and dateTime property data types.
  • Before Date - validates input date against a specified date. The input date has to be BEFORE the specified date. Can be applied to date and dateTime property data types.

Special Rules

  • Must be in the past - validates input date against the a relative date. When creating a concept the input value has to be BEFORE the current time. When editing a concept the input value hast to be BEFORE the creation date of the concept. 
  • Must be in the future - validates input date against the a relative date. When creating a concept the input value has to be AFTER the current time. When editing a concept the input value hast to be AFTER the creation date of the concept. 
  • Min Items - validates the number of items in an array property against a specified number. The number of items must be greather than or equal to the specified number. Can be applied to ANY array property of ANY property data type.
  • Max Items - validates the number of items in an array property against a specified number. The number of items must be less than or equal to the specified number. Can be applied to ANY array property of ANY property data type.

Unsupported Data Types

Boolean - a boolean is inherently only true or false, and thus no additional custom validation is necessary.

URL and ImageUrl - these can only be validated as a URL string,  and thus no additional validation is necessary.

2. Working with the validation rules

Custom validation rules can be added through the dataset creation wizzard, at the point when properties are being customised. You can also add or remove rules at any point after creating the Concept Type through the type schema editor.

Your rules will be applied immediately and will be visible in the Concept form.