434 questions
2 votes
2 answers
127 views
Validator in not a function in angular
I have created own directive for adding validation and removing validation based input parameters of directive. I am getting error when loading and form field value changing validator is not working ...
1 vote
2 answers
75 views
Angular Template-Driven Form: Validate Password Field Only After User Interaction
I have a form: <input type="password" id="password" name="password" ngModel #password="ngModel" ...
1 vote
1 answer
152 views
How to use updateValueAndValidity()
I have two form controls as min and max. At the beginning min has a default value of 1 and max is empty. I want that max be always greater than min, so I defined a custom validator, which works nicely....
1 vote
2 answers
90 views
Angular - Custom form validator
I have two mandatory form controls as: minimumCharacters and maximumCharacters. I want to show an error, if the given maximumCharacters is smaller than the given minimumCharacters. Here is how I have ...
1 vote
2 answers
102 views
Validation `Required` is not working with radiobtn when using ngFor in Reactive forms
I have a dynamic reactive angular form which builds forms and populates questions inside it dynamically according to questions types retrieved from the database. the problem is the required validation ...
1 vote
3 answers
176 views
Validation not working on fields name ending with dots in angular
I'm creating dynamic fields <input class="form-control-lg form-control" placeholder="{{data.DisplayName}}" formControlName="{{data.labelName}}" type="text" ...
1 vote
1 answer
310 views
Angular Material - Chips with Email validation
I'm trying to create a form with an input using chips to send a message to various emails. I have it almost functional but I don't know how to properly show the message error when you write an invalid ...
1 vote
2 answers
651 views
Combining HTML and Angular reactive form validation
I'm building an Angular Reactive Form and I have an input of type number. I have provided Validators.min(0) to the FormControl, however when I focus the input and scrolls down or holds the Arrow down ...
0 votes
4 answers
1k views
Get validators and values from angular FormControl
Is there a way for find out if an Angular FormControl has a validator and its value? e.g. If I had a form control setup like this: testControl: new FormControl(null, [Validators.required, Validators....
0 votes
2 answers
946 views
I've to disabled a FormControl but keep validation
I' ve this FormGroup: this.fb.group({ a: ["", Validators.required], b: ["", Validators.required], c: [{value: "", disabled: true}, Validators.required] }); ...
1 vote
1 answer
298 views
Angular FormArray Input Reactive Form in Mat Table: required Validator works perfectly, but @rxweb/reactive-form-validators somehow not
The validator works perfectly with required. But I need the unique validator, to check if the labels has duplicate names. When I switch to unique in inventory.component.ts the table isn't even showing ...
1 vote
2 answers
107 views
Angular Custom Validation Control doesn't get form value
This code in my form-validators.ts: console.log('password:', password?.value); console.log('confirmPwd:', confirmPwd?.value); always fetched me undefined, causing the custom validation (...
-1 votes
3 answers
2k views
Angular Reactive Form - Validation is not working in formGroup
I have this form group defined get createItem(): FormGroup { return this.formBuilder.group({ name: ['', Validators.required], email: ['', Validators.required], mobile: ['', ...
1 vote
1 answer
237 views
How to make this password match validation work
I have this code to check if both passwords match, however, it's not working as intended. I've tried what I've seen in some older questions but with no success. I have this in my component's template: ...
0 votes
2 answers
2k views
Angular - Form control invalid error not showing if set the value to form control
I have this editor <div id="editor"></div> setting its value to form control. this.FrmGroup.get("name").setValue(this.quill.root.innerHTML)` <div *ngIf="...