Instance ID typing constraints

Created on 3 September 2025, 3 days ago

In WithDisplayBuilderInterface::getInstance() we define Instance ID like that:

* Will be used as HTML id & class attributes and Javascript variables names
* (because of HTMX) so must follow the intersection between:
* - https://developer.mozilla.org/en-US/docs/Web/CSS/ident
* - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexica...
* Characters can be any of the following:
* - any ASCII character in the ranges A-Z and a-z
* - any decimal digit (0 to 9), except for the first character
* - an underscore (_)

Is it possible to enforce this in Instance entity? Do we need a strictly typed data?

📌 Task
Status

Active

Version

1.0

Component

Main / Misc.

Created by

🇫🇷France pdureau Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024