Answers for "angular implementing Validator"

0

angular implementing Validator

<>Copyimport {AbstractControl, ValidatorFn} from '@angular/forms';

export function blue(): ValidatorFn {  
    return (control: AbstractControl): { [key: string]: any } | null =>  
        control.value?.toLowerCase() === 'blue' 
            ? null : {wrongColor: control.value};
}
Posted by: Guest on May-31-2021

Code answers related to "angular implementing Validator"

Code answers related to "Javascript"

Browse Popular Code Answers by Language