bfg-common 1.3.536 → 1.3.538
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.
|
@@ -55,14 +55,16 @@ export const validateNameAndGenerateDataId = (name: string, _errorMessage: strin
|
|
|
55
55
|
{
|
|
56
56
|
regex: /^.{3,64}$/,
|
|
57
57
|
error_message:
|
|
58
|
-
|
|
58
|
+
/invalid name length, must be between: \d+ and \d+ characters/,
|
|
59
59
|
suffix: '-invalid-name-length',
|
|
60
60
|
},
|
|
61
61
|
]
|
|
62
62
|
|
|
63
63
|
// Проверка error_message на соответствие шаблонам
|
|
64
|
+
|
|
65
|
+
|
|
64
66
|
for (const pattern of patterns) {
|
|
65
|
-
if (pattern.regex.test(name)) {
|
|
67
|
+
if (!pattern.regex.test(name)) {
|
|
66
68
|
return `${baseDataId}${pattern.suffix}`
|
|
67
69
|
}
|
|
68
70
|
}
|