Service Account creation: validation error persists after clearing email field
Summary
Service Account creation form has a validation bug where entering a space in the email field causes a persistent "Email can't be blank" error that cannot be cleared without canceling and restarting.
Steps to reproduce
- Navigate to create a new Service Account
- Enter a space character in the email field
- Click Apply
- Observe "400 Bad request - Email can't be blank" error
- Remove the space from the email field (leaving it empty)
- Click Apply again
- Error persists despite empty field being valid
Example Project
N/A - reproducible on GitLab Self-Managed
What is the current bug behavior?
After entering and removing a space in the email field, the form continues to show "Email can't be blank" validation error. The only workaround is to cancel and recreate the Service Account without ever touching the email field.
What is the expected correct behavior?
Clearing the email field should reset validation state and allow successful submission with an empty (optional) email.
Relevant logs and/or screenshots
N/A
Output of checks
Reproduced on GitLab Self-Managed 18.6.1
Results of GitLab environment info
GitLab Self-Managed 18.6.1
Results of GitLab application Check
N/A
Possible fixes
The form state likely caches the validation error and doesn't re-validate when the field is cleared.
Patch release information for backports
If the bug fix needs to be backported in a patch release to a version under the maintenance policy, please follow the steps on the patch release runbook for GitLab engineers.
Refer to the internal "Release Information" dashboard for information about the next patch release, including the targeted versions, expected release date, and current status.
High-severity bug remediation
To remediate high-severity issues requiring an internal release for single-tenant SaaS instances, refer to the internal release process for engineers.