Data types
Alphabetical
The data type alphabetical accepts alphabetical strings. Doesn’t accept space, number or special characters.
Examples
Working Examples:
- “Hello”
- “World”
Not Working Examples:
- “Hello World” (contains space)
- “Hello123” (contains numbers)
- “Hello@World” (contains special characters)
Custom Regex
The data type custom regex accepts values matching a custom regular expression.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Regex | regex | string | Matches values against the regex in Python |
Examples
Working Examples:
- For regex
^[A-Z][a-z]*$
(starts with a capital letter followed by lowercase letters): “Hello”, “World”
Not Working Examples:
- For regex
^[A-Z][a-z]*$
: “hello” (does not start with a capital letter), “HELLO” (all uppercase)
Date
The data type date accepts dates in various formats.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Maximum date | max_date | date | Only accept dates before this date | |
Minimum date | min_date | date | Only accept dates after this date | |
Before now | before_now | boolean | Only accept dates before the current date | |
After now | after_now | boolean | Only accept dates after the current date |
Examples
Working Examples:
- “2024-05-28”
- “2023-12-31”
Not Working Examples:
- “2024-15-28” (invalid month)
Datetime
The data type datetime accepts date and time in various formats.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Maximum datetime | max_datetime | datetime | Only accept datetimes before this datetime | |
Minimum datetime | min_datetime | datetime | Only accept datetimes after this datetime | |
Before now | before_now | boolean | Only accept datetimes before the current datetime | |
After now | after_now | boolean | Only accept datetimes after the current datetime |
Examples
Working Examples:
- “2024-05-28T14:30:00”
- “2023-12-31T23:59:59”
Not Working Examples:
- “2023-13-31T23:59:59” (invalid month)
The data type email accepts valid email addresses.
Examples
Working Examples:
Not Working Examples:
- “example.com” (missing @)
- “[email protected]” (missing domain name)
Number
The data type number accepts numbers, positive or negative. Able to parse with ”,” or ”.” for float.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Only allow integer | only_allow_integer | boolean | Only accept integer values | |
Minimum value | min_value | integer | Only accept values superior to the rule | Can be useful to only accept positive values with min_value=0 |
Maximum value | max_value | integer | Only accept values inferior to the rule | Can be useful to only accept negative values with max_value=0 |
Examples
Working Examples:
- “123”
- “-45.67”
- “11,37”
Not Working Examples:
- “123abc” (contains letters)
Percentage
The data type percentage accepts values in percentage format.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Minimum value | min_value | integer | Only accept values superior to the rule | Can be useful to only accept positive values with min_value=0 |
Maximum value | max_value | integer | Only accept values inferior to the rule | Can be useful to only accept negative values with max_value=0 |
Examples
Working Examples:
- “50%”
- “99.99%”
- “99,99 %”
- “30”
Not Working Examples:
- “aez” (contains letters)
Picklist
The data type picklist allows selection from a predefined list of values.
Text
The data type text accepts general text strings.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Maximum length | max_length | integer | Only accept text up to this length | |
Minimum length | min_length | integer | Only accept text of at least this length |
Examples
Working Examples:
- “Hello World”
- “This is a text string.”
Time
The data type time accepts time values.
Rules
Name | Internal Name | Type | Effect | Tips |
---|---|---|---|---|
Maximum time | max_time | time | Only accept times before this time | |
Minimum time | min_time | time | Only accept times after this time |
Examples
Working Examples:
- “14:30:00”
- “23:59:59”
Not Working Examples:
- “24:00:00” (invalid hour)
- “12:60:00” (invalid minute)
URL
The data type URL accepts valid URLs.
Examples
Working Examples:
Not Working Examples:
- “www.example.com” (missing scheme)
- “http:// example.com” (contains space)
Boolean
The data type boolean accepts a lot of different true/false values.
Examples
Working Examples:
- “true”
- “yes”
- “y”
- “false”
- “1”
Not Working Examples:
- “123”
- hello”