Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48981

Form fields validation only if visible

$
0
0

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

Read full topic


Viewing all articles
Browse latest Browse all 48981

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>