Validates the date format (YYYY-MM-DD).
static bool isValidDateFormat(String date) => RegExp(r'^\d{4}-\d{2}-\d{2}$').hasMatch(date);