Visitar URL original
fix(web): allow profile settings to save with empty last name (#10122) by siddiqueirshad · Pull Request #10125 · makeplane/plane · GitHub
Skip to content

fix(web): allow profile settings to save with empty last name (#10122) - #10125

Open
siddiqueirshad wants to merge 1 commit into
makeplane:previewfrom
siddiqueirshad:fix/profile-empty-last-name-validation
Open

siddiqueirshad wants to merge 1 commit into
makeplane:previewfrom
siddiqueirshad:fix/profile-empty-last-name-validation

Conversation

@siddiqueirshad

@siddiqueirshad siddiqueirshad commented Oct 27, 2026 •

Copy link
Copy Markdown

Description

Fixes #10122

In Profile settings → General, the "Last name" field is optional (unlike first name which is required with an asterisk *), but submitting a profile with an empty or cleared last name was blocked because rules={{ validate: validatePersonName }} returned "Name is required" for empty or whitespace-only inputs.

Changes

  1. @plane/utils (packages/utils/src/validation.ts): Added and exported validateOptionalPersonName(name?: string | null): boolean | string, which returns true when the name is empty or whitespace-only, and delegates non-empty strings to validatePersonName(name).
  2. apps/web/components/settings/profile/content/pages/general/form.tsx: Updated the Controller rule for last_name to use validateOptionalPersonName, allowing users to save their profile with an empty last name while preserving validation (length and forbidden characters) when a last name is provided.

Summary by CodeRabbit

  • Bug Fixes
    • Last names are now optional in profile settings. When provided, they continue to be checked for valid length and characters.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91ce9f8b-82e9-4255-a845-7fb231d5ea8b
Commits

Reviewing files that changed from the base of the PR and between a9e7036 and a11b8e5.

Files selected for processing: 2
  • apps/web/components/settings/profile/content/pages/general/form.tsx
  • packages/utils/src/validation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

The profile settings form now allows an empty last name. Non-empty last names continue to use the existing person-name validation rules.

Changes: Profile last-name validation

Layer / File(s) Summary
Add and use optional name validation
packages/utils/src/validation.ts, apps/web/components/settings/profile/content/pages/general/form.tsx
The new validateOptionalPersonName accepts missing or whitespace-only values and delegates non-empty values to validatePersonName. The last-name field uses the new validator; first-name validation is unchanged.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: prateekshourya29

Merge Risk: Minimal · up to a11b8

The profile form change matches the requested behavior and is mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: allowing an empty last name in profile settings.
Description check Passed The description clearly explains the issue, root cause, implementation, and preserved validation behavior. It does not select a Type of Change checkbox or provide explicit test scenarios, but the requ…
Linked Issues check Passed Issue [#10122] requires an empty or whitespace-only last name to pass in Profile settings and requires validation for a provided last name. validateOptionalPersonName returns true for empty or whi…
Out of Scope Changes check Passed The diff changes only the Profile settings last-name rule and adds the supporting exported utility validator. These changes directly implement issue [#10122]. No unrelated product behavior is changed.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi…
Full details: Description check

Explanation

The description clearly explains the issue, root cause, implementation, and preserved validation behavior. It does not select a Type of Change checkbox or provide explicit test scenarios, but the required change is documented in sufficient detail.

Full details: Linked Issues check

Explanation

Issue [#10122] requires an empty or whitespace-only last name to pass in Profile settings and requires validation for a provided last name. validateOptionalPersonName returns true for empty or whitespace-only input and delegates non-empty input to validatePersonName, which preserves length and character checks. GeneralProfileSettingsForm uses this validator for last_name; first-name validation remains unchanged.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: Profile settings cannot be saved with an empty last name ("Name is required")

2 participants