Skip to main content

All Questions

0 votes
1 answer
330 views

Angular 5 form submitted flag undefined

I am new at Angular forms and I am not finding where is the problem. I get undefined when I try to access submitted flag of the Form. Also when I do console log of the form there is no submitted field....
user08's user avatar
  • 735
5 votes
1 answer
5k views

How to append the telephone number to the country code in angular 5 with primeng

Currently I'm working on a project using Angular 5 with primeng. I'm trying to append the country which coming from a dropdown to the phone number in a reactive form. I'm having a problem when I ...
Hashan94's user avatar
  • 115
1 vote
1 answer
1k views

Toggle between a formarray controls and another form control is not working in angular?

Hi I am having an angular 5 issue . Its available in stack blitz here. https://angular-ivy-jmrzng.stackblitz.io/ The issue is i have an angular 5 form . in the angular form i have a form array control ...
knowledgeseeker001's user avatar
2 votes
2 answers
234 views

Angular 5 - Reactive Forms

I am working on the reactive forms and I am not able to get the specifically the form control which has changed or updated from UI rather getting the whole form . I tried using valueChanges() but it ...
Harmandeep Singh Kalsi's user avatar
-1 votes
1 answer
182 views

Is it possible to set different values for same formcontrol while looping (*ngFor) in Angular 5

I'm new to Angular 5 .I need to loop a form control along with other fields .While looping the DIV section I need to set different values for the form control. Here I have List of employee name and ...
Zhu's user avatar
  • 3,925
6 votes
3 answers
27k views

How to show reactive forms validation error messages

Hellow guys, I'm struggling making a validator for a name input, I just replied the code from the angular wiki and still not working. Could you please help me to find the problem? Thanks in advise. ...
Gonzalo's user avatar
  • 329
1 vote
1 answer
2k views

How to validate multiple formControls at the same time in Angular2?

This is my main form group: this.mainForm = this.formBuilder.group({ productType1: new FormArray([], CustomValidators.minSelectedCheckboxes()), productType2: new FormArray(...
V K's user avatar
  • 97
1 vote
4 answers
15k views

Getting ERROR mat-form-field must contain a MatFormFieldControl

I am working on Angular form where I am trying to validate a reactive form . For template I am using Material design in my project , I am getting error on putting condition ngIf for validation in the ...
Test Anurag's user avatar
1 vote
2 answers
58 views

angular6: How to display value of form

I want to display only information from the form that controlname is in myObject. this.form = this.FormBuilder.group({ lname:[null, Validators.compose([Validators.required])], fname: [null, ...
user avatar
6 votes
2 answers
11k views

FormArray. Cannot find control with path

I want to output a form in which one field is an array, and for each element of the array I need to output my inputs. Component: ngOnInit() { const fb = this.fb; this.editForm = this.fb.group({ ...
Aymen Kanzari's user avatar
1 vote
0 answers
1k views

Reactive-Forms: FormControl Validator from Parent in Child Component

everyone, I built my Reactive-Form with Angular 6. Here I built the form in my ParentComponent with Validators: @Component({ selector: 'parent', template: ' <form [formGroup]="form" (...
Kirbylix's user avatar
10 votes
1 answer
16k views

angular 5 conditionally validate field based on another field's value

How to conditionally validate a field based on another field's value? Here's what i've tried but it seems not to work this.PDform = _formbuilder.group({ [...] 'intlNumber': ['',this....
hopeforall's user avatar
1 vote
3 answers
2k views

Angular 6 Reactive Forms Custom Validator Error Displayed from it's OWN data

I have a FormArray in a FormGroup and each of the FormArray has multiple FormGroup's and can add them dynamically. I have a Custom Validator where it checks with all the data in each of the FormArray ...
Varun's user avatar
  • 3,755
0 votes
1 answer
617 views

Angular 6 Reactive Forms Custom Validator getting error shown from Default Data

I have a FormArray in a FormGroup and each of the FormArray has multiple FormGroup's and can add them dynamically. I have a Custom Validator where it checks with all the data in each of the FormArray ...
Varun's user avatar
  • 3,755
0 votes
1 answer
2k views

Angular 6 Reactive Form, FormArray Async Validator unable to highlight a FormControl

I have a FormArray in a FormGroup and each of the FormArray has multiple FormGroup's and can add them dynamically. I have an Async Validator where it needs all the data in the FormGroup to validate ...
Varun's user avatar
  • 3,755

15 30 50 per page