For the complete documentation index, see llms.txt. This page is also available as Markdown.

Validation and conditional logic

Configure Required state, type-aware validation, help text, and nested conditional branches.

Validation defines whether a supplied value satisfies the data contract. Conditional logic controls when a question is relevant. Required is separate: a value may be required and also subject to a type-aware constraint.

Configure a selected property

Selected ontology property with Required, Dynamic, default, validation, help text, and dependency controls

Select a property in the schema canvas to configure its identity and additional settings in the right inspector.

  1. Open the ontology and select the class.

  2. Select the property card in the schema canvas.

  3. In Selected property, confirm the property name, description, and stable ID.

  4. Enable Required only when an absent value makes the annotation incomplete.

  5. Enable Dynamic at property creation for supported video or medical time-varying states.

  6. Set a default only when it is semantically true for new annotations; a convenience default can silently bias labels.

  7. Open Validation and choose the rule appropriate to the scalar type.

  8. Add Help text that explains the accepted form or boundary to the annotator.

  9. Review Depends on when the property is conditional.

Type-aware validation

Property value
Compact validation supported by the current contract

String

Length or regular expression.

Number

Numeric range or regular expression.

Date or datetime

Allowed date/time range.

URL, email, or object ID

Regular expression appropriate to the identifier contract.

Multiple choice

Minimum or maximum selection count.

Single-choice properties already constrain the value to one configured option. Keep Required state, controlled options, and any available type-specific validation conceptually separate.

Create conditional questions

Conditional ontology tree with Bottle, Glass, and color branches

The schema canvas keeps each WHEN condition next to the option that reveals its child property, including deeper nested branches.

The illustrated logic can be read as:

  1. Ask the parent property.

  2. If Bottle is selected, reveal the child material property.

  3. If Glass is selected, reveal the nested glass-color property.

  4. Otherwise, do not ask the irrelevant child question.

To add the branch, create the parent choice property and its options, add the child property beneath the relevant option, then continue nesting only where another answer changes what must be collected. Use View Logic Map before publication to confirm all branches are reachable and named clearly.

What happens when a value is invalid

Unitlab keeps invalid values visible rather than silently replacing them. The operator receives a message, the value remains in annotation history, and the item can surface through the project's Invalid path or QA cohort. Correct the value when evidence supports a valid answer; otherwise use the configured issue, escalation, invalid-data, or rework route.

Acceptance test for validation and logic

  • enter values at, below, and above every boundary;

  • test valid and invalid string formats;

  • select the minimum and maximum allowed choice counts;

  • leave every Required field empty once and confirm the visible invalid state;

  • traverse every parent option and verify only relevant children appear;

  • test nested branches with keyboard and pointer input;

  • inspect the JSON and a sample release so IDs, types, missing values, and nested answers match the downstream contract.


Related Unitlab capability guides: enterprise data annotation workflows