You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.
We need to add input validation for the component name inputs to ensure they satisfy the default format specified in the backstage architectural decisions docs:
Strings of length at least 1, and at most 63 (from testing, it's observed that it should actually be at most 62 chars)
Must consist of sequences of [a-z0-9A-Z] possibly separated by one of [-_.]
For this default format, we will need to add the following pattern validation for the input field:
Correction: It seems I have misinterpreted the backstage entity name requirements. The [-_.] characters have to be used as separators not as leading or ending characters.
Which is why c0mponent-name_1234567890.abcdefghijklmnopqrstuvwxyz-abcdefghi_ doesn't work. However something like c0mponent-name_1234567890.abcdefghijklmnopqrstuvwxyz-abcdefghij will work.
What needs to be done?
We need to add input validation for the component name inputs to ensure they satisfy the default format specified in the
backstage architectural decisions docs
:For this default format, we will need to add the following pattern validation for the input field:
The 62 maxLength is because the catalog appears to actually not accept names that are 63 characters long.- Tested withc0mponent-name_1234567890.abcdefghijklmnopqrstuvwxyz-abcdefghi_
which is exactly 63 chars long, but it got rejected.- Tested withc0mponent-name_1234567890.abcdefghijklmnopqrstuvwxyz-abcdefghi
, and it was accepted and ingested into the catalog/This should prevent invalid names from being entered:
The text was updated successfully, but these errors were encountered: