t_Facets_Facet
Facet
Properties
description : stringFacet description
invariant : booleanTrue to validate the facet only on the object where it is declared, false to validate it on all objects having it.
name : identifierFacet name
Valid values based on“string”. :?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)* Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed.
validation : stringValidation expression taking "this" and "value" as arguments and returning #f, a string id, or a list of format arguments if the facet is invalid.
Facets may have values tested against a validation script. The validation expression takes "this" (the current faceted object) and "value" (the value of the facet) as its arguments and returns #f, a string id, or a list of format arguments if the facet is invalid.- Example
(if (not (number? value))
`("ids.numericValueError" ,value)
) ; where ids.numericValueError is "Facet must be numeric. '{0}' is not valid."
values : stringList of valid values. Set to () for no value validation.
Parents
Facets - A set of facets that can be applied to metadata objects.
Parent topic: Facets