summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-ui/src/app/ng2')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
index 2e56ce1580..831732dcf5 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
@@ -170,6 +170,14 @@ export class ConstraintsComponent implements OnInit {
if (Array.isArray(constraint.value)) {
return !(constraint.value.length == 0 || this.doesArrayContaintEmptyValues(constraint.value));
}
+ if (constraint.type == ConstraintTypes.pattern) {
+ try {
+ new RegExp(constraint.value);
+ this.valid = true;
+ } catch(e) {
+ this.valid = false;
+ }
+ }
return constraint.value && constraint.type != ConstraintTypes.null
});
}