Skip to content

fix: correct partId validation error message#814

Open
kimjune01 wants to merge 2 commits into
dart-lang:masterfrom
kimjune01:fix-607-partid-error-message
Open

fix: correct partId validation error message#814
kimjune01 wants to merge 2 commits into
dart-lang:masterfrom
kimjune01:fix-607-partid-error-message

Conversation

@kimjune01
Copy link
Copy Markdown

Summary

  • Fixed the error message in SharedPartBuilder to correctly describe the allowed characters for partId: letters, numbers, _, and -
  • The previous message incorrectly mentioned . (period) as an allowed character and referenced start/end rules that do not exist in the regex

Fixes #607

Test plan

  • All 63 existing tests pass
  • Added test verifying that hyphens are accepted in partId
  • Added test verifying the error message mentions - and does not mention .

kimjune01 added 2 commits May 11, 2026 22:19
The error message for invalid SharedPartBuilder partId claims periods
are allowed but hyphens aren't mentioned, while the regex allows
hyphens but not periods.
Error message now matches actual validation rules: letters, numbers,
underscore, and hyphen. Removes incorrect mention of dot character.
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.

SharedPartBuilder partId validation regex and error message are inconsistent

1 participant