logo
Angular - Quiz(MCQ)
When using FormBuilder, how are validation rules specified?
A)
As part of the FormControl configuration: heroName: ['', Validators.required]
B)
As part of the FormControl configuration: heroName: [Validators.required, '']
C)
As standard HTML validation attributes added to the input element
D)
As part of the input element binding: formControl="[heroName, Validators.required]"

Correct Answer :   As part of the FormControl configuration: heroName: ['', Validators.required]