Skip to content

Support SHACL property pair constraint components #2

@knoan

Description

@knoan

challenge / use case

The current validation engine handles property constraints in isolation. There's no way to express cross-property constraints like "start date must be before end date" or "confirmation email must match email" declaratively within a shape definition.

proposal

Support SHACL property pair constraint components:

  • sh:equals — value nodes must equal values of another property on the same focus node
  • sh:disjoint — value nodes must not overlap with values of another property
  • sh:lessThan — each value node must be less than all values of another property
  • sh:lessThanOrEquals — each value node must be less than or equal to all values of another property

alternatives

  • Custom validators on the resource shape can already express these checks imperatively, but this loses the declarative/introspectable nature of shape constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions