👉

Did you like how we did? Rate your experience!

Rated 4.5 out of 5 stars by our customers 561

Award-winning PDF software

review-platform review-platform review-platform review-platform review-platform

Video instructions and help with filling out and completing Can Form 8655 Validate

Instructions and Help about Can Form 8655 Validate

This is part 23 of the Angular 6 tutorial. In this video, let's discuss validating dynamically generated form controls. At the moment, on this form, we only have one set of skill related fields. So, notice when we touch the fields and leave them without typing anything, we get the validation errors as expected. Now, let's add two more sets of these skill related fields. Notice that the moment we have added two more sets, the validation errors disappeared. And look at this, when we touch the fields and leave them without typing anything, we don't get any validation errors. So, the validation for this dynamically generated form controls is broken at the moment. Let's fix it in this video. This is our Creed employee component class. Notice here we have our root form group `employeeForm`, and within our root form group, we have `skills` which is a form array. Within the form array, we have skill groups. Every time we click this "Add Skill" button, we are calling this method `addSkillFormGroup`. And if you take a look at what that method is doing, it is returning a form group with these three form controls: skill name, experience in years, and proficiency. At the moment, on our form, we have three skill form groups, each skill form group containing these three form controls: skill, experience, and proficiency. So `skills` is a form array which contains our skill form groups. And if we take a look at our view template, notice that we are looping through each form group that we have in our skills form array. And this variable `skill` contains a reference to the form group that we are currently iterating over. So, as we are looping through each form group in this form array, we are going to use this `skill` variable to determine if the...