Skip to content
Snippets Groups Projects
Commit 3ab98caf authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

update value and validity

parent 63bd4243
No related branches found
No related tags found
1 merge request!443Signals and Reactive Forms: AWS Applications
......@@ -224,5 +224,6 @@ export class AppFacade {
required,
Validators.pattern(/^[a-zA-Z0-9]*$/),
]);
this.formGroup.controls.id.updateValueAndValidity();
}
}
......@@ -114,6 +114,7 @@ export class AppFacade {
this.formGroup.controls.id.addValidators(control =>
Validators.required(control)
);
this.formGroup.controls.id.updateValueAndValidity();
}
/**
......
......@@ -22,6 +22,7 @@ export function addValidators(
): void {
addCloudValidators(formGroup.controls.cloudConfig);
addNshmpValidators(formGroup);
formGroup.updateValueAndValidity();
}
function addCloudValidators(cloudConfig: FormGroupControls<CloudConfig>): void {
......
......@@ -44,6 +44,7 @@ export class AppFacade {
control => Validators.required(control),
Validators.pattern(/^[a-zA-Z0-9]*$/),
]);
this.formGroup.controls.id.updateValueAndValidity();
this.formGroup.valueChanges.subscribe(() => this.updateUrl());
}
......
......@@ -261,5 +261,7 @@ export class AppFacade {
form.controls.vs30.addValidators(required);
form.controls.width.addValidators(required);
form.controls.zTor.addValidators(required);
form.updateValueAndValidity();
}
}
......@@ -18,6 +18,7 @@ export function addValidators(formGroup: FormGroupControls<ControlForm>): void {
formGroup.controls.truncation.addValidators(control =>
Validators.required(control)
);
formGroup.updateValueAndValidity();
}
function boundsValidators(control: FormControl, bounds: FormBounds): void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment