Custom Validator

[Solved] Custom Validator | Solidity - Code Explorer | yomemimo.com
Question : custom validator

Answered by : difficult-dunlin-qc6rlu8gkhpa

import {AbstractControl, ValidatorFn} from '@angular/forms';
export function blue(): ValidatorFn { return (control: AbstractControl): { [key: string]: any } | null => control.value?.toLowerCase() === 'blue' ? null : {wrongColor: control.value};
}
<>

Source : https://indepth.dev/the-best-way-to-implement-custom-validators | Last Update : Fri, 04 Dec 20

Answers related to custom validator

Code Explorer Popular Question For Solidity