dateOfBirth static method

String? dateOfBirth({
  1. required String dob,
  2. String format = "yyyy-MM-dd",
  3. int minAgeYears = 18,
  4. int maxAgeYears = 120,
  5. int? minAgeDays,
  6. bool useUtc = false,
  7. String? invalidFormatMessage,
  8. String? futureDateMessage,
  9. String? tooYoungMessage,
  10. 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,
  );
}