Skip to content

Commit b084e99

Browse files
authored
Merge pull request #601 from devtron-labs/chore/add-bool-scope-var-regex
fix: update regex for numbers and add boolean pattern with scope variables
2 parents 42757ac + 7cfe52b commit b084e99

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.8.0",
3+
"version": "1.8.0-patch-1",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Common/Constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export const PATTERNS = {
3939
START_END_ALPHANUMERIC: /^(([A-Za-z0-9].*[A-Za-z0-9])|[A-Za-z0-9])$/,
4040
ALPHANUMERIC_WITH_SPECIAL_CHAR: /^[A-Za-z0-9._-]+$/, // allow alphanumeric,(.) ,(-),(_)
4141
ESCAPED_CHARACTERS: /[.*+?^${}()|[\]\\]/g,
42-
NUMBERS_WITH_SCOPE_VARIABLES: /^(\d+(\.\d+)?|@{{[a-zA-Z0-9-]+}})$/,
42+
NUMBERS_WITH_SCOPE_VARIABLES: /^(\d+(\.\d+)?|@{{([a-zA-Z0-9-_\s]+)}})$/,
43+
BOOLEAN_WITH_SCOPE_VARIABLES: /^(TRUE|FALSE|true|false|True|False|@{{([a-zA-Z0-9-_\s]+)}})$/,
4344
ALL_DIGITS_BETWEEN_0_AND_7: /^[0-7]*$/,
4445
// eslint-disable-next-line no-useless-escape
4546
CONFIG_MAP_AND_SECRET_MULTIPLE_KEYS: /^[-._a-zA-Z0-9\,\?\s]*[-._a-zA-Z0-9\s]$/,

0 commit comments

Comments
 (0)