Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72473

How to compare two values in formBuilder?

$
0
0

I have the form builder as follows,

this.feedbackForm = new FormGroup({
  figure: new FormControl('', Validators.pattern(/^[0-9]+$/)),
  maxVal: new FormControl(''),
  minVal: new FormControl('', Validators.max(feedbackForm.values.maxVal - 1)),
});

Here I want to compare minVal such that it is lesser than max value,but from the above code it shows the error as follows,

ERROR TypeError: Cannot read property 'values' of undefined

Can anyone please suggest me help.Thanks.


Viewing all articles
Browse latest Browse all 72473

Trending Articles



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