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 }}
Repository navigation
[bug]: Profile settings cannot be saved with an empty last name ("Name is required") #10122
In Profile settings → General the "Last name" field is shown as optional (no asterisk), but a profile with an empty last name cannot be saved: the field shows "Name is required" and nothing is saved.
The cause is the validation added in #8528: the last_name field uses the same rule as the required first name.
validatePersonName (packages/utils/src/validation.ts) returns "Name is required" for an empty or whitespace-only value. The API accepts an empty last_name (PATCH /api/users/me/), so only the form blocks it.
Expected: an empty last name can be saved; a non-empty one is validated as before (length, special characters).
A minimal fix that works for us in a self-hosted build: validate the last name only when it is not empty, e.g. validate: (value) => !value?.trim() || validatePersonName(value). Happy to open a PR against preview.
Related: #7281 (onboarding requires the last name, settings treats it as optional), #2511.
Steps to reproduce
Open Profile settings → General.
Clear the Last name field.
Click Save changes.
"Name is required" appears under Last name; the profile is not saved.
Environment
Production
Browser
Other (any browser: it is client-side form validation)
Edition
Community
Version
v1.4.2 (self-hosted); the same code is on preview (checked 2026-10-26).
Activity
fix(web): allow saving profile settings with an empty last name (make…
fix(web): allow saving profile settings with an empty last name (make…