最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Form Validation for dynamic added fields in Angular 6 - Stack Overflow

matteradmin5PV0评论

I've created a reactive form with multiple input fields. The validation works fine for one field but I stuck for the validation on my dynamic added input fields.

What I want to achieve is that for every row the both input fields should be required too. The problem must be the access of the formarray.

I created a simplified version on Stackblitz

I've created a reactive form with multiple input fields. The validation works fine for one field but I stuck for the validation on my dynamic added input fields.

What I want to achieve is that for every row the both input fields should be required too. The problem must be the access of the formarray.

I created a simplified version on Stackblitz

Share Improve this question asked Nov 27, 2018 at 12:56 yougeenyougeen 1681 silver badge14 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 5

Accessing the form array input control is not correct way. I updated the stackblitz. Refer this https://stackblitz./edit/angular-3cym5a

Post a comment

comment list (0)

  1. No comments so far