Rule Anatomy
A DAQS rule is a structured configuration that combines a filter, one or more validations, and error messages into a single publishable check.
Every part has a specific role. Understanding the full structure prevents the most common authoring mistakes.
The parts of a rule
Rule
├── Name
├── Description
├── Filter (JSONata)
├── Validations
│ ├── Validation 1
│ │ ├── Name
│ │ ├── Value to Validate (query)
│ │ ├── Validator type + configuration
│ │ └── Error message
│ └── Validation 2 (in a collection)
│ └── ...
├── Selectors
└── Online Help URL (optional)
Rule Name
The name identifies the rule in the DAQS rule list and in reports. It should describe the check in a few words:
- "Door types — Assembly Code required"
- "FamilyInstance — Mark must be filled"
Not what the rule does mechanically, but what it enforces.
Description
A structured text block that explains the rule to users and colleagues. Every published rule must have a description following the standard template — see Rule Description Template.
Filter
The JSONata expression that selects the elements this rule applies to and shapes the data for validation.
The filter returns a list of objects. Each object becomes one row in the validation step.
(
$[type = "FamilySymbol" and values.category.label = "OST_Doors"].{
"id": id,
"type": type,
"name": name,
"assemblyCode": values.assemblyCode
}
)
Everything the validator needs must be in this output. If a field is not returned, the validator cannot see it.
Validations
Each validation defines one check against the filter output.
A rule can have a single validation or a collection of validations. See Single Validation and Collection Validation.
Each validation has:
| Part | Purpose |
|---|---|
| Name | Shown in the Revit plugin — describes what is wrong |
| Value to Validate | A query expression pointing at the field to check |
| Validator | The type and configuration (not empty, in list, matches regex, etc.) |
| Error message | What the user sees when the validation fails |
Error Message
Written in Markdown with {{placeholders}} from the filter output. Must follow the Issue / Solution / Explanation structure.
See Error Messages.
Selectors
Selectors determine which rule configuration this rule belongs to. They control when and where the rule is applied.
See Selectors and GUIDs.
Online Help URL
An optional URL that opens documentation directly from the Revit plugin. Use this when the error message cannot fully explain the standard or the correction process.
See Online Help.
The dependency chain
Every part depends on the one before it:
Requirement → Description → Filter → Validation → Error message
If the filter does not return the right data, the validation is wrong. If the validation is wrong, the error message is meaningless. Design from requirement to filter — not the other way around.