Hi, I can validate form by the help of FormBuilder and FormControl as below
> this.myForm = this.formBuilder.group({
> Description: new FormControl('', Validators.required),
> PerHour: new FormControl('',Validators.required))
> })
But I want to validate field PerHour only if this is visible.
PerHour is visible when I click on radio button.
Means; validate only if flag is true.
How can I do this?
2 posts - 2 participants