angular-reactive-forms Questions

4

Solved

I have this simple form and used in create and update cases so for create case the user will enter the data and base on validatorsI will get the form.valid (true,false). In update case I just get t...
Originate asked 22/7, 2018 at 15:35

3

Solved

I have an Angular Reactive form. I subscribe to its value changes and will emit changes to parent component. Some of the controls might get disabled by the user. The problem is that values from dis...
Underbody asked 27/12, 2017 at 13:17

21

Solved

I am having trouble finding out how to mark all form's fields as touched. The main problem is that if I do not touch fields and try to submit form - validation error in not shown up. I have placeho...
Subcutaneous asked 10/11, 2016 at 14:19

4

Solved

We have an autocomplete input with required validation. When a user searches for an option by entering a query (but doesn't pick any of the options) then the input is valid, even though it doesn't ...
Mikael asked 16/8, 2018 at 7:25

2

Solved

I thought that a disabled control would not get validated. But I'm facing this issue. I have reproduced using the official Angular reactive form sample: https://stackblitz.com/edit/angular-hyvj24?f...
Precedence asked 12/1, 2021 at 23:4

2

Solved

I am trying to implement a custom validator function to check either of the Phone numbers(Home Phone and Mobile) are entered or not. I want to show the error message on both the fields when they ar...
Risarise asked 5/12, 2017 at 19:57

1

Solved

I am using primeng for template. And I am using p-fileupload component, but I need to use it in reactive form, so I want to know where to put formControlName as I don't get any input or something l...
Baur asked 1/12, 2022 at 17:13

8

Solved

We have a component that has a dynamically built form. The code to add a control with validators might look like this: var c = new FormControl('', Validators.required); But let's say that I want t...
Openwork asked 5/8, 2016 at 20:34

7

Solved

I am using Angular 5 with Reactive forms and need to make use of the valueChanges in order to disable required validation dynamically component class: export class UserEditor implements OnInit { ...
Albemarle asked 14/12, 2017 at 20:49

3

Solved

While being on the latest version of Angular (version 14), it seems that I am not doing something well and thus strictly typed reactive forms are not working as expected. Form is initialized inside...
Lissotrichous asked 19/6, 2022 at 17:38

6

I am using angular5 reactivemodule to show a form in my application. I had also used required validator which will subsequently make the field in red color and show an error msg to the user. It is...
Contemplative asked 12/4, 2018 at 4:51

3

Solved

import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; @Component({ selector: 'app-user-register', templateUrl: './user-register....
Kitchens asked 23/4, 2021 at 14:33

11

Solved

I'm trying to implement a custom validator to check if the password and password confirm are equal. The problem is that the validator is getting undefined password and confirmedPassword parameters....

3

PostCreateComponent.html:56 ERROR TypeError: Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'. at PostsService.push../src/app/posts/posts.service.ts.PostsService.addPost...
Begay asked 13/7, 2019 at 3:55

2

Solved

How do i use formGroupName inside child components? for example: i have ParentFormComponent parentForm: FormGroup; constructor(private fb: FormBuilder, private http: Http) { } ngOnInit() { ...
Kinswoman asked 3/12, 2018 at 5:51

3

Solved

I have the following form: const enum Fields { FirstName = 'firstName', LastName = 'lastName' } interface FormType { [Fields.FirstName]: FormControl<string | null>; [Fields.LastName]: Fo...
Schaper asked 4/6, 2022 at 15:11

9

Solved

I am a newbie in Angular and following an online course using Angular 10 but stuck at one point. I am trying to implement the Reactive forms. For that, I have added a new component text-input. The ...
Vogele asked 29/12, 2020 at 2:31

7

Solved

I have Angular 6 app with form. Here is an examle export class ExampleComponent implements OnInit { form: FormGroup; constructor(private fb: FormBuilder) { } ngOnInit() { this.form = new For...
Agenesis asked 1/3, 2019 at 10:59

2

I am new to angular unit testing. Test Scenario: The form view value in the html is equal to the component form value. The email value is retrieved by a shared value and being used in the componen...

2

I have a FormGroup with multiple nested groups and controls. Most of these contain validators such as Validators.required. Whenever the user clicks the submit button, I recursively loop through the...
Pathogenic asked 1/7, 2019 at 8:45

2

Solved

I working on Angular FormArray, therefore I working on this tutorial: https://www.youtube.com/watch?v=aOQ1xFC3amw Unfortunately I can’t apply the tutorial. I got an error in my HTML part. I use Ang...

3

Solved

Using the ComponentFactoryResolver to dynamically create a component is straight forward, but it doesn't seem to project the created component into the parent when I try and do this for the Angular...
Scottie asked 22/10, 2019 at 17:28

7

Solved

Can not acces it in the same way as in Angular docs, so must grab the FormGroup instance first and find FormControl instance in there.. I wonder why? This example works: <form [formGroup]="myFo...
Stetson asked 16/6, 2017 at 12:35

3

Solved

Please go through the link(https://ng-select.github.io/ng-select#/multiselect-checkbox) to know ng-select multi select checkbox. I am trying to use the ng-select "Group selects children" in my ang...
Amphibious asked 19/9, 2018 at 18:2

4

I am using reactive forms in Angular 7. I have many fields that are dependent on other fields. What I am curious about of what should I use (change) or this.form.get("control_name").value...

© 2022 - 2024 — McMap. All rights reserved.