Where to configure it
Open Project configuration > Fields and edit a field. Fields whose data type supports constraints show a Validation Constraints section in the editor dialog: Project admins can manage the Fields configuration screen for their own project, including field presets, field import/export, section ordering, high-level shipment detail ordering, and per-field settings. Superadmin access is not required for project-scoped field configuration.| Data type | Available constraints |
|---|---|
string, text | Minimum length, maximum length, pattern (regular expression) |
integer, float | Minimum value, maximum value |
Patterns are unanchored JavaScript regular expressions. Use
^ and $ when
the whole value must match, e.g. ^[A-Z0-9-]+$.Example: customer reference limited to 50 characters
Edit thecustomer_reference field (shipment scope), set Maximum length to 50, and save. No code change or re-extraction is needed — the limit applies immediately to every shipment in the project.
How enforcement works
Constraints are checked in the app against the live field configuration:- Send to TMS is blocked while any violation exists. This applies to the send button on the shipment detail page and to the send actions on the order overview. The send button’s hover checklist lists each violation — for example “Customer Reference must be at most 50 characters (currently 62)” — and clicking an entry scrolls to and highlights the offending field.
- Saving stays possible. Extraction can produce violating values on its own, and operators must be able to save work in progress. Saving a shipment with violations shows a warning toast listing them.
- Empty values never violate constraints. Whether a field may be empty is controlled by the separate Mandatory flag.
order, shipment, stop, goods_line, and item scopes. Order-scope fields are validated against the shipment’s parent order, which matters for projects that publish full order payloads to the TMS.
Import, export, and presets
Constraints are part of the field catalog:- Export JSON includes each field’s
constraintsobject, and Import JSON applies it. - Saved field presets store and restore constraints.
- Importing a file or loading a preset created before constraints existed keeps the constraints currently configured on matching fields; they are only cleared when the imported field carries an explicit
"constraints": null.