Bug Description
The New Project modal allows a project to be created with a one-character Key (for example, A).
After the project has been created, opening Project Settings > General and changing another field, such as the project icon, fails because the existing key is rejected with a validation error stating that the key must contain at least two characters.
The project creation modal and the project settings page therefore enforce different validation rules for the same field. This also leaves the project in a state where unrelated settings cannot be saved without first changing its key.
Steps To Reproduce
- Open a workspace.
- Open the New Project modal.
- Enter a project name.
- Enter a one-character key, for example
A.
- Click Create Project.
- Open the newly created project's Settings > General page.
- Change another setting, such as the project icon.
- Attempt to save the change.
Expected Behavior
The Key field should use the same validation rules during project creation and project editing.
If project keys must contain between 2 and 8 characters, the creation modal should reject a one-character key and display the validation error before the project is created.
Actual result
The creation modal accepts and persists a one-character project key, but the project settings form subsequently considers that same key invalid and prevents settings from being saved.
Screenshots
No response
Environment
Additional Context
This inconsistency is also present on the current main branch:
- The creation modal only requires a non-empty key and sets a maximum length of 8 characters.
- The project settings form requires the key to contain between 2 and 8 characters.
- The API schemas currently accept any string length for the key.
Using the same shared validation rules for project creation, project editing, and the API would prevent these paths from drifting apart and would stop invalid project keys from being persisted.
Related but distinct issue: #875 — Project Key input lacks character limit/overflow handling addressed excessively long keys, not the inconsistent minimum length.
Bug Description
The New Project modal allows a project to be created with a one-character Key (for example,
A).After the project has been created, opening Project Settings > General and changing another field, such as the project icon, fails because the existing key is rejected with a validation error stating that the key must contain at least two characters.
The project creation modal and the project settings page therefore enforce different validation rules for the same field. This also leaves the project in a state where unrelated settings cannot be saved without first changing its key.
Steps To Reproduce
A.Expected Behavior
The Key field should use the same validation rules during project creation and project editing.
If project keys must contain between 2 and 8 characters, the creation modal should reject a one-character key and display the validation error before the project is created.
Actual result
The creation modal accepts and persists a one-character project key, but the project settings form subsequently considers that same key invalid and prevents settings from being saved.
Screenshots
No response
Environment
Additional Context
This inconsistency is also present on the current
mainbranch:Using the same shared validation rules for project creation, project editing, and the API would prevent these paths from drifting apart and would stop invalid project keys from being persisted.
Related but distinct issue: #875 — Project Key input lacks character limit/overflow handling addressed excessively long keys, not the inconsistent minimum length.