Angular - Reactive Forms
Identify the issue in this custom validator code snippet:
function maxLengthValidator(control: AbstractControl): ValidationErrors | null {
if (control.value.length > 10) {
return { maxLength: true };
}
}