Skip to main content
1 vote
1 answer
245 views

Angular form async validator firing but not updating form validity

This is my first time trying an async form validator. It is attached at to my form's asyncValidators, it's firing appropriately, the correct value (object or null) is being returned ... but the form ...
Emery Noel's user avatar
2 votes
2 answers
113 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
1 vote
3 answers
170 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,872
1 vote
2 answers
638 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
1 answer
548 views

How to get list of all validators of Angular FormControl?

I have a component with a custom Form Control. And in this component I need to get a list of validators from the parent component. I use Reactive forms everywhere, so I don't need to inject ...
user avatar
0 votes
1 answer
413 views

In nested FormGroup the validators on the FormControl are not working

I have a FormGroup that contains a nested DatePicker FormGroup; this nested FormGroup contains two FormControls FromDate and ToDate. For this nested FormGroup Validators I have two of them. one ...
Ibrahim Doqa's user avatar
0 votes
0 answers
151 views

Mat-error not triggering in custom phone input component implementing ControlValueAccessor and Validator

I am trying to create a custom phone input component by implementing ControlValueAccessor and Validator in Angular, but I have an issue with mat-error not triggering. The FormGroup seems to work, as ...
dialeev's user avatar
0 votes
1 answer
452 views

Angular regex validation

User is going to input in the form and only allowed numbers separated by comma. I want to allow space after comma but not before comma and white space anywhere else is fine. (I only want to add ...
ctpanchal's user avatar
  • 731
0 votes
3 answers
812 views

Angular 10 reactive form Validators minLength to ignore spaces

Is there any solution to use Validators.minLength(6) but to ignore spaces ? E.G: 1234 5 this would validate but it shouldn't as I'm looking to validate 6 digits without spaces E.G: 1234 56 Thanks.
Juliano's user avatar
  • 137
0 votes
1 answer
434 views

Angular validator doesnt work when text is inserted into textarea

The child component e-notes-p-quick-phrases-list has a mat-grid-list that when the user clicks on, can then click an Insert button that inserts that text into the textarea "notes" in the ...
angleUr's user avatar
  • 933
0 votes
1 answer
694 views

how to make inputs in angular accept only specific data

Im working on an angular project and i want to create an input that only accepts 3 values 0, 0.5, 1 and if the user enters for example 0.4 he will get an error message and tell him to enter only one ...
Fouad_Aurag's user avatar
2 votes
1 answer
86 views

How to custom validate two text boxes with a regular expression /^[1-9]\d*$/?

I'm trying to write a custom validator for 2 text boxes, with some conditions. Please see the code I wrote in Stackblitz Link to validate the text boxes with some conditions Kindly help me where did I ...
jhansiReddy's user avatar
0 votes
1 answer
1k views

angular 12 custom validator validate one item is selected from array

HI I am doing an Angular 12 App using Material. I have my FormGroup like this form:FormGroup=new FormGroup({ Id: new FormControl(null), Name: new FormControl('',Validators.required), ...
Diego's user avatar
  • 2,392
2 votes
1 answer
1k views

Async validator not executing

Stackblitz: https://angular-ivy-mhot2x.stackblitz.io For my Angular (13.0.2) application, I've created a validator to check if a URL is already in use (i.e. GET <URL> does not return 404). ...
Aurelia Peters's user avatar

15 30 50 per page
1
2 3 4 5