Questions tagged [angular2-validators]
3 questions
1
vote
1 answer
Remove all the validations on a FormControl
How Can I remove all the validations on a FormControl ( which is a component in this case ).
I declared the FormControl like this in the constructor :
this.form = formBuilder.group({
fileUploadControl: new FormControl()
});

Brahim LAMJAGUAR
- 1,254
- 5
- 19
- 28
0
votes
0 answers
How to add required validation on both value and text field of a dropdown in angular 2
In below angular-2 code I am using a dropdown inside a form which is required field , if i use the validation on the value field of the dropdown it works fine but i want the value and text both should not be null or empty, how can i add the required…

Mohan Singh
- 1,142
- 3
- 15
- 30
-1
votes
2 answers
How to validate an email in Angular2?
I am using FormGroup, FormBuilder and Validators class to validate a form in Angular2 app.
This is how I am defining the required validation rules for email and password validation:-
export class LoginComponent implements OnInit {
…

Saswat
- 12,320
- 16
- 77
- 156