@shaxpir/duiduidui-models 1.6.14 → 1.6.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/models/Profile.js +3 -3
- package/package.json +1 -1
package/dist/models/Profile.js
CHANGED
|
@@ -148,15 +148,15 @@ class Profile extends Content_1.Content {
|
|
|
148
148
|
}
|
|
149
149
|
// Allow a wide range of characters for international names
|
|
150
150
|
// - Letters from any language (Unicode letters)
|
|
151
|
-
// - Spaces, hyphens, apostrophes, periods (common in names)
|
|
151
|
+
// - Spaces, hyphens, apostrophes, periods, commas (common in names)
|
|
152
152
|
// - Chinese characters (CJK Unified Ideographs)
|
|
153
153
|
// Reject control characters, emojis, and other special characters
|
|
154
|
-
const validPattern = /^[\p{L}\p{M}\s'
|
|
154
|
+
const validPattern = /^[\p{L}\p{M}\s'\-\.,]+$/u;
|
|
155
155
|
if (!validPattern.test(fullName)) {
|
|
156
156
|
return {
|
|
157
157
|
isValid: false,
|
|
158
158
|
reason: 'invalid_characters',
|
|
159
|
-
message: 'Full name contains invalid characters. Only letters, spaces, hyphens, apostrophes, and
|
|
159
|
+
message: 'Full name contains invalid characters. Only letters, spaces, hyphens, apostrophes, periods, and commas are allowed'
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
162
|
// Check for reasonable structure (not just whitespace/punctuation)
|