Skip to content

Commit ed65a6d

Browse files
Copilothotlong
andcommitted
fix: Remove unnecessary escape characters in phone regex
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 459052b commit ed65a6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/validation/validation-engine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export class ValidationEngine {
171171

172172
case 'phone':
173173
if (typeof value === 'string') {
174-
const phoneRegex = /^[\d\s\-\+\(\)]+$/;
174+
const phoneRegex = /^[\d\s\-+()]+$/;
175175
if (!phoneRegex.test(value)) {
176176
return message || 'Invalid phone number';
177177
}

0 commit comments

Comments
 (0)