docs: update identity-revealed.directive.ts to use `AbstractControl` instead of `FormGroup` (#40132)
Changes example code to accept an `AbstractControl` instead of `FormGroup` in `identityRevealedValidator` function. Closes #40131. PR Close #40132
This commit is contained in:
parent
49dcb06dca
commit
5013a7e12d
|
@ -4,7 +4,7 @@ import { AbstractControl, FormGroup, NG_VALIDATORS, ValidationErrors, Validator,
|
|||
|
||||
// #docregion cross-validation-validator
|
||||
/** A hero's name can't match the hero's alter ego */
|
||||
export const identityRevealedValidator: ValidatorFn = (control: FormGroup): ValidationErrors | null => {
|
||||
export const identityRevealedValidator: ValidatorFn = (control: AbstractControl): ValidationErrors | null => {
|
||||
const name = control.get('name');
|
||||
const alterEgo = control.get('alterEgo');
|
||||
|
||||
|
|
Loading…
Reference in New Issue