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
fix(utils): allow apostrophes in person names - #10271
Allow ASCII apostrophes in first and last names, as the existing person-name pattern and documentation intend. The earlier shared character guard rejects names such as O'Brien and D'Arcy before that pattern is evaluated.
Exclude apostrophes only from the person-name validator's temporary guard input, then validate the unchanged original name against the existing pattern. The shared helper and display-name, company, workspace and slug validators keep their existing behavior. The error message no longer lists apostrophes as forbidden.
This affects the shared validation used by admin instance setup, onboarding and profile settings. It does not add period support, alter the existing whitespace/letter-presence rules, or transform submitted names.
Type of Change
Bug fix (non-breaking change which fixes an issue)
Feature (non-breaking change which adds functionality)
Improvement (change that would cause existing functionality to not work as expected)
Code refactoring
Performance improvements
Documentation update
Screenshots and Media (if applicable)
Not applicable to this shared-validator change. No live browser flow was exercised.
Test Scenarios
Native Vitest 4.1.12: 42 tests passed, including a final repeat after aggregate validation.
Same tests with the original validator: 27 passed, 15 failed. Three failures demonstrate the apostrophe acceptance problem (O'Brien, D'Arcy, and the 50-character boundary); twelve are corrected error-message comparisons, not twelve additional acceptance defects.
Covers apostrophes combined with every remaining forbidden character, Unicode names, current whitespace/hyphen-only behavior, unsupported characters/URLs/control characters, 50/51-character limits, optional blanks, and unchanged other validators.
Frozen-lockfile installation passed. Vitest reuses the existing catalog and lock snapshot; no package versions were upgraded.
All 45 format/lint/type checks and 11 prerequisite package builds from the current Turbo check graph passed through native task execution. The unmodified pnpm check wrapper stopped when i18n's tsx CLI could not create an IPC listener (EPERM). For the separate complete graph run, the two i18n generator commands used supported node --import tsx scripts/generate-types.ts instead, without starting that listener or changing repository scripts.
git diff --check passed. Full application production builds, browser flows, database persistence and hosted CI were not run. Backend source inspection confirms no apostrophe-specific name rejection; this is not a persistence-test claim.
References
The same inconsistency was addressed in the earlier, closed-unmerged #9667. This current-preview change keeps the shared helper's API unchanged and adds focused regression coverage.
Related but separate: #10165, #10170 and #10174 handle periods/pre-filled validation. Their current diffs do not change the earlier apostrophe-rejecting guard. Test setup should be reconciled if another utils testing change lands first.
Summary by CodeRabbit
New Features
Person names can now include apostrophes. Existing character and length validation remains in place, and required versus optional handling of blank names is unchanged.
Bug Fixes
Apostrophes continue to be rejected in display names, company names, workspace names, and slugs.
No actionable comments were generated in the recent review.
Walkthrough
validatePersonName now allows apostrophes through its injection-risk check. The change adds validation tests and a Vitest test script and development dependency to @plane/utils.
Changes: Person-name validation
Layer / File(s)
Summary
Validator behavior and test coverage packages/utils/src/validation.ts, packages/utils/src/validation.test.ts, packages/utils/package.json
validatePersonName removes apostrophes before applying the shared injection-risk check. Tests cover person-name validation and confirm that other validators still reject apostrophes. The package adds a Vitest test script and development dependency.
makeplane/plane#10147: Adds validateOptionalPersonName, which delegates non-empty names to the validator changed here.
makeplane/plane#10165: Changes the same validator and test setup, with a separate change to accepted name characters.
makeplane/plane#10125: Adds validateOptionalPersonName, which delegates non-empty names to the validator changed here.
Suggested reviewers:sriramveeraghanta
Merge Risk: Minimal · up to b939e
Person names with apostrophes will now be accepted in the shared validator, while other characters remain rejected. No concrete merge-blocking risk was identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: the person-name validator now accepts apostrophes. It uses the conventional fix(utils) prefix and is concise and specific. It matches the raw summary and the PR object…
Description check
The description covers the change, the reason for it, the affected validators, and the scope limits. It fills the Type of Change section with Bug fix checked. It includes test scenarios with detailed …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: the person-name validator now accepts apostrophes. It uses the conventional fix(utils) prefix and is concise and specific. It matches the raw summary and the PR objectives.
Full details: Description check
Explanation
The description covers the change, the reason for it, the affected validators, and the scope limits. It fills the Type of Change section with Bug fix checked. It includes test scenarios with detailed results and references to related PRs. The Screenshots section explains why no screenshots apply. The template's Description, Type of Change, Screenshots, Test Scenarios, and References sections are all present. The test-scenario text is long and dense, but the required information is present.
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: 55526239-9a22-41c5-bd69-e678d34335c4
Commits
Reviewing files that changed from the base of the PR and between 6190932 and b939e9e.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 3
packages/utils/package.json
packages/utils/src/validation.test.ts
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.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow ASCII apostrophes in first and last names, as the existing person-name pattern and documentation intend. The earlier shared character guard rejects names such as
O'BrienandD'Arcybefore that pattern is evaluated.Exclude apostrophes only from the person-name validator's temporary guard input, then validate the unchanged original name against the existing pattern. The shared helper and display-name, company, workspace and slug validators keep their existing behavior. The error message no longer lists apostrophes as forbidden.
This affects the shared validation used by admin instance setup, onboarding and profile settings. It does not add period support, alter the existing whitespace/letter-presence rules, or transform submitted names.
Type of Change
Screenshots and Media (if applicable)
Not applicable to this shared-validator change. No live browser flow was exercised.
Test Scenarios
O'Brien,D'Arcy, and the 50-character boundary); twelve are corrected error-message comparisons, not twelve additional acceptance defects.pnpm checkwrapper stopped when i18n's tsx CLI could not create an IPC listener (EPERM). For the separate complete graph run, the two i18n generator commands used supportednode --import tsx scripts/generate-types.tsinstead, without starting that listener or changing repository scripts.git diff --checkpassed. Full application production builds, browser flows, database persistence and hosted CI were not run. Backend source inspection confirms no apostrophe-specific name rejection; this is not a persistence-test claim.References
The same inconsistency was addressed in the earlier, closed-unmerged #9667. This current-preview change keeps the shared helper's API unchanged and adds focused regression coverage.
Related but separate: #10165, #10170 and #10174 handle periods/pre-filled validation. Their current diffs do not change the earlier apostrophe-rejecting guard. Test setup should be reconciled if another utils testing change lands first.
Summary by CodeRabbit