dateOfBirth static method
String?
dateOfBirth(
{ - required String dob,
- String format = "yyyy-MM-dd",
- int minAgeYears = 18,
- int maxAgeYears = 120,
- int? minAgeDays,
- bool useUtc = false,
- String? invalidFormatMessage,
- String? futureDateMessage,
- String? tooYoungMessage,
- String? tooOldMessage,
})
Implementation
static String? dateOfBirth({
required String dob,
String format = "yyyy-MM-dd",
int minAgeYears = 18,
int maxAgeYears = 120,
int? minAgeDays,
bool useUtc = false,
String? invalidFormatMessage,
String? futureDateMessage,
String? tooYoungMessage,
String? tooOldMessage,
}) {
return DateOfBirthValidator.validate(
dob,
format: format,
minAgeYears: minAgeYears,
maxAgeYears: maxAgeYears,
minAgeDays: minAgeDays,
invalidFormatMessage: invalidFormatMessage,
futureDateMessage: futureDateMessage,
tooYoungMessage: tooYoungMessage,
tooOldMessage: tooOldMessage,
useUtc: useUtc,
);
}