fixed firewall rule editor validation issue

This commit is contained in:
Dragos 2021-05-13 14:35:05 +03:00
parent 6c9e6dd811
commit 43d4fd72f9
3 changed files with 5 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -56,7 +56,8 @@ export class FirewallRuleEditorComponent implements OnInit, OnDestroy
this.editorForm.get(['ruleSettings', 'key']).setValue(null);
this.editorForm.get(['ruleSettings', 'value']).setValue(null);
this.editorForm.get('ruleSettings').clearValidators();
this.editorForm.get(['ruleSettings', 'key']).clearValidators();
this.editorForm.get(['ruleSettings', 'value']).clearValidators();
setTimeout(() =>
{
@ -98,6 +99,9 @@ export class FirewallRuleEditorComponent implements OnInit, OnDestroy
{
this.keyRegex = '^.+$';
}
this.editorForm.get(['ruleSettings', 'key']).updateValueAndValidity();
this.editorForm.get(['ruleSettings', 'value']).updateValueAndValidity();
}, 0);
});
}