Frequently Used Validation
When does validation happen?
Validation based on your Object Type Data Schema is enforced as follows.
Anytime a Record is created, updated or patched programmatically, either internally in your Contextual solution and its processing of data, or when an external system uses the Tenant API to interact with Object Type records
When Records are created or updated using the Contextual Workspace UI, the forms that are presented to users for doing so perform a combination of client-side input validation with onChange user feedback (e.g. minLength, regular expression match), enforced data format entry using custom-rendered UI elements (e.g. Date+Time Pickers), and/or validation success or failure after submission of the form (e.g. ipv6).
Learn more about JSON Schema Type-Specific Keywords (https://json-schema.org).
String Values
These are common ways to validate "type": string
values in your data schema. All validation and data requirements are enforced by your Tenant API
Validation | UI Input Type | UI Validation Feedback |
---|---|---|
| Input Field | On change, prevents form submission |
| Input Field | On change, prevents form submission |
| Date+Time Picker | Only valid input allowed using picker |
| Time Picker | Only valid input allowed using picker |
| Date Picker | Only valid input allowed using picker |
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
| Input Field | On change, prevents form submission |
Numeric Values
These are common ways to validate "type": "number"
and "type": "int"
numeric values in your data schema.
Validation | UI Input Type | UI Validation Feedback |
---|---|---|
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
| Input Field | On submission/processing, validation error returned |
Boolean Value
These are common ways to validate "type": "boolean"
values in your data schema.
"const": true
specifies either true or false value
"type": "object"
code
note
"type": "array"
code
note
Last updated