Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
2 answers
112 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 ...
Angular Guru's user avatar
0 votes
0 answers
128 views

How to prevent Angular form control from showing validation errors (red outline) on load in a reusable input component?

I’m working on an Angular form with a custom reusable input component that has required fields using Validators.required. When the page loads, the form controls are initially empty and marked as ...
worst_coder's user avatar
1 vote
2 answers
74 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" ...
user28273827332's user avatar
1 vote
1 answer
147 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....
user6781's user avatar
  • 611
1 vote
2 answers
88 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 ...
user6781's user avatar
  • 611
1 vote
2 answers
96 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 ...
Mohammad AM's user avatar
1 vote
3 answers
164 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" ...
user3653474's user avatar
  • 3,868
1 vote
1 answer
291 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 ...
Jorge Castillo's user avatar
1 vote
2 answers
628 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 ...
Martin's user avatar
  • 66
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....
Sun's user avatar
  • 4,808
0 votes
2 answers
867 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] }); ...
Cristian De Vecchi's user avatar
1 vote
1 answer
292 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 ...
AAAA's user avatar
  • 35
1 vote
2 answers
102 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 (...
L1N3NM3L0N's user avatar
-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: ['', ...
user3653474's user avatar
  • 3,868
1 vote
1 answer
234 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: ...
Tony Ortega's user avatar

15 30 50 per page
1
2 3 4 5
26