Fix ESLint errors: remove unnecessary escape characters in phone regex#281
Merged
hotlong merged 3 commits intocopilot/implement-object-and-field-schemasfrom Jan 30, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix issues in action run for objectui
Fix ESLint errors: remove unnecessary escape characters in phone regex
Jan 30, 2026
f61c8ca
into
copilot/implement-object-and-field-schemas
8 of 9 checks passed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes ESLint no-useless-escape errors in the phone validation regex and adds test coverage for phone number validation.
Changes:
- Fixed phone validation regex by removing unnecessary escape characters for
+,(, and)within the character class - Added comprehensive test cases for phone validation covering multiple valid formats and an invalid case
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/core/src/validation/validation-engine.ts | Removed unnecessary escape characters from phone validation regex |
| packages/core/src/validation/tests/validation-engine.test.ts | Added test coverage for phone validation with valid and invalid test cases |
Contributor
|
✅ All checks passed!
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CI failing due to
no-useless-escapelint errors in phone validation regex atvalidation-engine.ts:174.Changes
Fixed regex: Characters
+()don't require escaping within character classAdded test coverage: Phone validation now tested with common formats (
123-456-7890,+1 (234) 567-8900,1234567890)Note
The regex remains intentionally permissive (allows any combination of digits, spaces,
-+()) - this is pre-existing behavior, not modified by this PR.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.