We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 654a733 commit f823aebCopy full SHA for f823aeb
src/utils/validateTrimmedString.ts
@@ -13,9 +13,11 @@ export function validateItemName(
13
}
14
15
//Remove punctuation marks and normalize input
16
- const punctuationRegex = /[^a-z0-9]/g;
+ const punctuationRegex = /[^\p{L}]/gu;
17
18
- const normalizedInputName = input.toLowerCase().replace(/[^a-z0-9]/g, "");
+ const normalizedInputName = trimmedInput
19
+ .replace(punctuationRegex, "")
20
+ .toLowerCase();
21
22
//Create a list of normalized existing item names
23
const normalizedExistingItemNames = existingItems.map((existingItem) => {
0 commit comments