Browse Source
Merge pull request #12909 from ArtemDzhereleiko/AD/bug-fix/create-relation-node/validation
Fixed validation for target entity type create relation node
pull/12927/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
ui-ngx/src/app/modules/home/components/rule-node/action/create-relation-config.component.ts
|
|
@ -81,7 +81,7 @@ export class CreateRelationConfigComponent extends RuleNodeConfigurationComponen |
|
|
|
|
|
|
|
|
protected updateValidators(emitEvent: boolean) { |
|
|
protected updateValidators(emitEvent: boolean) { |
|
|
const entityType: EntityType = this.createRelationConfigForm.get('entityType').value; |
|
|
const entityType: EntityType = this.createRelationConfigForm.get('entityType').value; |
|
|
if (entityType) { |
|
|
if (entityType && entityType !== EntityType.TENANT) { |
|
|
this.createRelationConfigForm.get('entityNamePattern').setValidators([Validators.required, Validators.pattern(/.*\S.*/)]); |
|
|
this.createRelationConfigForm.get('entityNamePattern').setValidators([Validators.required, Validators.pattern(/.*\S.*/)]); |
|
|
} else { |
|
|
} else { |
|
|
this.createRelationConfigForm.get('entityNamePattern').setValidators([]); |
|
|
this.createRelationConfigForm.get('entityNamePattern').setValidators([]); |
|
|
|