Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (control: AbstractControl): ValidationErrors | null => {
let dateAdapter = new MomentDateAdapter('de');
let date = dateAdapter.parse(control.value, OC_DATE_FORMATS.parse.dateInput);
if (isNull(date)) {
return {
'date': {'requiredFormat': OC_DATE_FORMATS.parse.dateInput}
};
}
return null;
};
}