@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
13 lines (12 loc) • 590 B
TypeScript
export declare const DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
export declare function splitValue(value: string, dateFormat?: string): string[];
/**
* Validates a complete date of birth. Incomplete values (where the
* year/month/day cannot all be extracted) are considered valid here, so the
* field can rely on its required/pattern validation for those.
*/
export declare function validateDateOfBirth(value: string, { dateFormat, errorDateOfBirth, errorDateOfBirthFuture, }: {
dateFormat?: string;
errorDateOfBirth: string;
errorDateOfBirthFuture: string;
}): Error | undefined;