Skip to main content

Interface: ValidationRule

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:4

A structural validation constraint applied to an artifact's content.

Properties

children?

readonly optional children?: readonly ValidationRule[]

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:16

Nested rules evaluated against the matched node's children.


contentMatches?

readonly optional contentMatches?: string

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:14

Regex pattern the rendered node content must match.


id?

readonly optional id?: string

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:6

Unique identifier for this validation rule within its artifact.


path?

readonly optional path?: string

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:10

JSONPath expression targeting a value within the artifact (JSON/YAML formats).


required?

readonly optional required?: boolean

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:12

Whether the matched node must exist. Defaults to true when omitted.


selector?

readonly optional selector?: Selector

Defined in: packages/core/src/domain/value-objects/validation-rule.ts:8

AST node selector that identifies the target node(s) to validate.