Loading
Add inline validation for group name field
What does this MR do and why?
Adds inline validation to the group name field on the group creation form (Vue-based GroupNameAndPath component) with granular error messages that identify specific rule violations (start character or allowed character set).
Validation runs as users type, providing immediate feedback instead of waiting for form submission.
This MR has been split for easier review:
- This MR — inline name validation on the group creation form (
/groups/new). - Follow-up !243038 (merged) — inline name validation on the group general settings (edit) page (
/groups/<group>/-/edit).
References
Relates to #597214 (closed)
Follow-up: !243038 (merged)
Screenshots or screen recordings
How to set up and validate locally
- Open
/groups/new#create-group-panein your browser. - Verify error states:
- Leave Group name empty and submit → expect
Group name is required. - Type
-foo→ expect inline format error. - Type
foo$bar→ expect inline format error.
- Leave Group name empty and submit → expect
- Verify valid input shows no error:
- Type
My Group. - Type
🚀 Rockets(emoji start). - Type
_internal.
- Type
- Verify recovery:
- Type
-bad, then clear the field → expect error disappears. - Type
-bad, then fix tobad→ expect error disappears.
- Type
- Reload the page and don't touch the name field → expect no error until submit.
- Verify no regressions:
- Edit the Group URL/path field with invalid input → expect its own validation still works.
- On EE, visit
/-/subscriptions/groups/newand confirm the subscription group selector's name validation still behaves as before.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Shane Maglangit