zazuko / rdf-validate-shacl

Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
MIT License
95 stars 12 forks source link

Add resultMessage for class constraint #92

Open thomasdegroot18 opened 2 years ago

thomasdegroot18 commented 2 years ago

Thanks for continuing to improve this library!

Observation

Currently the class constraint component produces no message at all. This is a missed opportunity. Together with issue 63 Adding a result message would tie up all of the default constraints.

Expectation

I would propose tweaking the detail validation result message when an Class constraint is violated.

A proposed message could be of type, :

Value is not of type {$class}

Where $class cuold be the rdfs:label if there is a label and otherwise the node value if there is no label is not given.