"$comment":"Prop names are exposed as Twig variables in the component template. Twig identifiers must start with a letter or underscore and cannot contain dashes, so prop names must match ^[a-zA-Z_][a-zA-Z0-9_]*$. Same pattern as slotDefinition.",
"$comment":"Slot names are exposed as Twig block names in the component template. Twig identifiers must start with a letter or underscore and cannot contain dashes, so slot names must match ^[a-zA-Z_][a-zA-Z0-9_]*$. Same pattern as propDefinition",
"$comment":"Prop names are exposed as Twig variables in the component template. Twig identifiers must start with a letter or underscore and cannot contain dashes, so prop names must match ^[a-zA-Z_][a-zA-Z0-9_]*$. Same pattern as slotDefinition.",
"$comment":"Slot names are exposed as Twig block names in the component template. Twig identifiers must start with a letter or underscore and cannot contain dashes, so slot names must match ^[a-zA-Z_][a-zA-Z0-9_]*$. Same pattern as propDefinition",
"additionalProperties":false,
"patternProperties":{
"^[a-zA-Z0-9_-]+$":{
"^[a-zA-Z_][a-zA-Z0-9_]*$":{
"type":"object",
"properties":{
"title":{
@@ -69,6 +83,7 @@
},
"variantDefinition":{
"type":"object",
"$comment":"Variant names may contain dashes because they are used as string values (CSS modifiers, equality checks) and are never converted into Twig variable or block names.",
'The component "%s" declares prop(s) with invalid name(s): [%s]. Prop names must match the pattern "^[a-zA-Z_][a-zA-Z0-9_]*$" so they can be used as Twig variables.',
$definition['id'],
implode(', ',$invalid_prop_names),
));
}
// If the validator isn't set, then the validation library is not installed.