I am not able to reset my validation once the user enters a value into the UI. In the debugger I can see the value is getting passed into the onModelChange
Should the Validators.required be something that checks the length?
<descriptor [model]="model" (modelchange)="onValueChange(model)"></descriptor>
Type Script
@Output() public modelchange: EventEmitter<any> = new EventEmitter();
public onModelChange(): void {
this.validate();
this.modelchange.next(this.getModel());
}
initControlGroup(fb: FormBuilder) : FormGroup {
return fb.group({
"value": ['', Validators.required]
});
}
from Angular ControlGroup Validate not resetting values

No comments:
Post a Comment