@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix mud: <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mud.ttl#> .
@prefix mudchar: <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mudchar.ttl#> .
@prefix mudcharshapes: <https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/shapes/core/mudchar.ttl#> .
mudcharshapes:Character a sh:NodeShape ;
sh:targetClass mudchar:Character ;
sh:property mudcharshapes:SpeciesProperty .
mudcharshapes:SpeciesProperty
sh:path mud:species ;
sh:name "Species" ;
sh:description "A Character is not obliged to have a species" ;
sh:maxCount 1 ;
sh:class mud:Species .
mudcharshapes:Species a sh:NodeShape ;
sh:targetClass mud:Species ;
sh:property [
sh:name "@id" ;
sh:description "Enter the urlid of the desired species" ;
sh:defaultValue "https://raw.githubusercontent.com/Multi-User-Domain/vocab/main/mud.ttl#Human" ;
sh:minCount 1 ;
sh:maxCount 1 ;
] .
The live demo renders the form for Species correctly. When I select to add a species, it's rendered correctly (the sub-form is shown and the user is only able to add one urlid)
During validation I receive the following error in the console, and the graph isn't validated:
When I remove sh:maxCount from the mudcharshapes:Species NodeShape the error is removed and I can continue (but the user is able to add multiple urlid fields)
Steps to reproduce
I'm using the following shape:
The live demo renders the form for Species correctly. When I select to add a species, it's rendered correctly (the sub-form is shown and the user is only able to add one urlid)
During validation I receive the following error in the console, and the graph isn't validated:
When I remove
sh:maxCount
from themudcharshapes:Species
NodeShape the error is removed and I can continue (but the user is able to add multiple urlid fields)