bfg-common 1.5.241 → 1.5.242
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.
|
@@ -47,7 +47,7 @@ const defaultForm: UI_I_DefaultForm = {
|
|
|
47
47
|
validations: [
|
|
48
48
|
{
|
|
49
49
|
value: 'password',
|
|
50
|
-
errorText: localization.value.common.
|
|
50
|
+
errorText: localization.value.common.passwordsMustLeast8CharactersLongContainUpperAndLowerCaseLetterNumberAndSpecialCharacter,
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
53
|
},
|
package/lib/utils/utils.ts
CHANGED
|
@@ -10,9 +10,15 @@ export const enumKeyFromValue = (
|
|
|
10
10
|
return dataFromEnum ? dataFromEnum[0] : undefined
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
export const extractContentInBrackets = (inputString: string): string => {
|
|
14
|
+
const regex = /\[([^\]]+)\]/
|
|
15
|
+
const match = inputString.match(regex)
|
|
16
|
+
|
|
17
|
+
return match ? match[1] : ''
|
|
18
|
+
}
|
|
13
19
|
export const extractContentLastSlash = (
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
inputString: string,
|
|
21
|
+
after = false
|
|
16
22
|
): string => {
|
|
17
23
|
const regex = after ? /\/([^/]+)\/?$/ : /(.*)\//
|
|
18
24
|
|
|
@@ -21,6 +27,12 @@ export const extractContentLastSlash = (
|
|
|
21
27
|
return match ? match[1] : ''
|
|
22
28
|
}
|
|
23
29
|
|
|
30
|
+
export const removeLastSlash = (
|
|
31
|
+
inputString: string
|
|
32
|
+
): string => {
|
|
33
|
+
return inputString.endsWith('/') ? inputString.slice(0, -1) : inputString
|
|
34
|
+
}
|
|
35
|
+
|
|
24
36
|
export const intToIp = (value: number): string => {
|
|
25
37
|
return [
|
|
26
38
|
(value >> 24) & 0xff,
|