fix regex and typo

Signed-off-by: pitwegner <pit.wegner@student.hpi.de>
This commit is contained in:
pitwegner
2023-03-09 13:07:25 +01:00
parent be9c422807
commit 547726995e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,4 +2,4 @@
'@backstage/catalog-model': minor
---
Modified the regex for dns label validation to support IDN domains
Modified the regex for DNS label validation to support IDN domains
@@ -91,7 +91,7 @@ export class CommonValidatorFunctions {
typeof value === 'string' &&
value.length >= 1 &&
value.length <= 63 &&
/^((?!\-))(xn\-\-)?[a-z0-9\-]+[a-z0-9]$/.test(value)
/^((?!\-))(xn\-\-)?[a-z0-9\-]*[a-z0-9]$/.test(value)
);
}