Description
Currently, fields with sh:maxCount 0 are rendered as "list" in the form.
For example, if we set sh:maxCount 0 in the default Catalog schema, the client (in this case v2.0.0-alpha.1) renders the following form:

Expected behavior
Definition of sh:maxCount from the SHACL spec:
If the number of value nodes is greater than $maxCount, there is a validation result.
This would imply that, for sh:maxCount 0, no value nodes are allowed at all.
Usage examples are found in the shacl-shacl shapes graph in the spec (in combination with sh:or). Also see e.g. validatingrdf.
Notes
Here's how the SHACL form renderer handles maxCount 0, based on isList():
|
function isList(field: FormField): boolean { |
|
return field.maxCount !== 1 |
|
} |
and in getShaclValue() we find:
|
if (fieldConfig.maxCount === 1) { |
Note that Field.maxCount (or FormField.maxCount) can be null:
Description
Currently, fields with
sh:maxCount 0are rendered as "list" in the form.For example, if we set
sh:maxCount 0in the defaultCatalogschema, the client (in this case v2.0.0-alpha.1) renders the following form:Expected behavior
Definition of
sh:maxCountfrom the SHACL spec:This would imply that, for
sh:maxCount 0, no value nodes are allowed at all.Usage examples are found in the shacl-shacl shapes graph in the spec (in combination with
sh:or). Also see e.g. validatingrdf.Notes
Here's how the SHACL form renderer handles
maxCount 0, based onisList():FAIRDataPoint-client/src/components/ShaclForm/fieldUtils.ts
Lines 24 to 26 in d6eacb9
and in
getShaclValue()we find:FAIRDataPoint-client/src/utils/metadata.ts
Line 95 in d6eacb9
Note that
Field.maxCount(orFormField.maxCount) can be null:FAIRDataPoint-client/src/components/ShaclForm/Parser/SHACLParser.ts
Line 61 in d6eacb9