diff --git a/base/comment-injection-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts b/head/comment-injection-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
index 934c40e..8b95765 100644
--- a/base/comment-injection-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
+++ b/head/comment-injection-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/comment-injection-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts b/head/comment-injection-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
index 2a64dc5..a2cb294 100644
--- a/base/comment-injection-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
+++ b/head/comment-injection-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
@@ -116,10 +116,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/comment-injection-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts b/head/comment-injection-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
index 504b925..4e63492 100644
--- a/base/comment-injection-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
+++ b/head/comment-injection-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts b/head/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
index 7b4e86e..b741906 100644
--- a/base/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
+++ b/head/comment-injection-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/016af.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/033b1.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart
index 0b5e83a..da1de94 100644
--- a/base/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/0a358.json/default/TopLevel.dart
@@ -77,10 +77,10 @@ class Result {
 
     factory Result.fromJson(Map<String, dynamic> json) => Result(
         code: json["code"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         name: json["name"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -93,3 +93,10 @@ class Result {
         "uri": uri,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart
index 9e427ee..2f57bb6 100644
--- a/base/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/0a91a.json/default/TopLevel.dart
@@ -31,7 +31,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         actor: Actor.fromJson(json["actor"]),
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         org: json["org"] == null ? null : Actor.fromJson(json["org"]),
         payload: Payload.fromJson(json["payload"]),
@@ -302,12 +302,12 @@ class PullRequest {
         base: Base.fromJson(json["base"]),
         body: json["body"],
         changedFiles: json["changed_files"],
-        closedAt: DateTime.parse(json["closed_at"]),
+        closedAt: _parseDateTime(json["closed_at"]),
         comments: json["comments"],
         commentsUrl: json["comments_url"],
         commits: json["commits"],
         commitsUrl: json["commits_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         deletions: json["deletions"],
         diffUrl: json["diff_url"],
         head: Base.fromJson(json["head"]),
@@ -321,7 +321,7 @@ class PullRequest {
         mergeable: (json.containsKey("mergeable") ? json["mergeable"] : throw FormatException('Missing required property')),
         mergeableState: json["mergeable_state"],
         merged: json["merged"],
-        mergedAt: DateTime.parse(json["merged_at"]),
+        mergedAt: _parseDateTime(json["merged_at"]),
         mergedBy: MergedBy.fromJson(json["merged_by"]),
         milestone: (json.containsKey("milestone") ? json["milestone"] : throw FormatException('Missing required property')),
         number: json["number"],
@@ -334,7 +334,7 @@ class PullRequest {
         state: json["state"],
         statusesUrl: json["statuses_url"],
         title: json["title"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         user: MergedBy.fromJson(json["user"]),
     );
@@ -571,7 +571,7 @@ class BaseRepo {
         compareUrl: json["compare_url"],
         contentsUrl: json["contents_url"],
         contributorsUrl: json["contributors_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         defaultBranch: json["default_branch"],
         deploymentsUrl: json["deployments_url"],
         description: (json.containsKey("description") ? json["description"] : throw FormatException('Missing required property')),
@@ -612,7 +612,7 @@ class BaseRepo {
         owner: MergedBy.fromJson(json["owner"]),
         private: json["private"],
         pullsUrl: json["pulls_url"],
-        pushedAt: DateTime.parse(json["pushed_at"]),
+        pushedAt: _parseDateTime(json["pushed_at"]),
         releasesUrl: json["releases_url"],
         size: json["size"],
         sshUrl: json["ssh_url"],
@@ -625,7 +625,7 @@ class BaseRepo {
         tagsUrl: json["tags_url"],
         teamsUrl: json["teams_url"],
         treesUrl: json["trees_url"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         watchers: json["watchers"],
         watchersCount: json["watchers_count"],
@@ -895,3 +895,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart
index d4cd93f..8919284 100644
--- a/base/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/0e0c2.json/default/TopLevel.dart
@@ -80,7 +80,7 @@ class Result {
         id: json["id"],
         images: List<Image>.from(json["images"].map((x) => Image.fromJson(x))),
         language: resultLanguageValues.map[json["language"]]!,
-        releaseDate: DateTime.parse(json["release_date"]),
+        releaseDate: _parseDateTime(json["release_date"]),
         stars: json["stars"],
         tags: (json.containsKey("tags") ? json["tags"] : throw FormatException('Missing required property')) == null ? null : List<dynamic>.from((json.containsKey("tags") ? json["tags"] : throw FormatException('Missing required property'))!.map((x) => x)),
         title: json["title"],
@@ -325,3 +325,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/167d6.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/16bc5.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/1b28c.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart
index 11a49c7..ed9ff86 100644
--- a/base/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/1b409.json/default/TopLevel.dart
@@ -105,7 +105,7 @@ class Object {
         current: json["current"],
         description: json["description"],
         district: json["district"],
-        enddate: DateTime.parse(json["enddate"]),
+        enddate: _parseDateTime(json["enddate"]),
         extra: Extra.fromJson(json["extra"]),
         id: json["id"],
         leadershipTitle: (json.containsKey("leadership_title") ? json["leadership_title"] : throw FormatException('Missing required property')),
@@ -116,7 +116,7 @@ class Object {
         roleTypeLabel: roleTypeLabelValues.map[json["role_type_label"]]!,
         senatorClass: (json.containsKey("senator_class") ? json["senator_class"] : throw FormatException('Missing required property')),
         senatorRank: (json.containsKey("senator_rank") ? json["senator_rank"] : throw FormatException('Missing required property')),
-        startdate: DateTime.parse(json["startdate"]),
+        startdate: _parseDateTime(json["startdate"]),
         state: json["state"],
         title: titleValues.map[json["title"]]!,
         titleLong: roleTypeLabelValues.map[json["title_long"]]!,
@@ -233,7 +233,7 @@ class Person {
 
     factory Person.fromJson(Map<String, dynamic> json) => Person(
         bioguideid: json["bioguideid"],
-        birthday: DateTime.parse(json["birthday"]),
+        birthday: _parseDateTime(json["birthday"]),
         cspanid: json["cspanid"],
         firstname: json["firstname"],
         gender: genderValues.map[json["gender"]]!,
@@ -351,3 +351,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart
index 1c1c48f..5f84c95 100644
--- a/base/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/262f0.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -439,3 +439,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart
index 764956c..64c1b2a 100644
--- a/base/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/2d4e2.json/default/TopLevel.dart
@@ -109,7 +109,7 @@ class Object {
         current: json["current"],
         description: json["description"],
         district: (json.containsKey("district") ? json["district"] : throw FormatException('Missing required property')),
-        enddate: DateTime.parse(json["enddate"]),
+        enddate: _parseDateTime(json["enddate"]),
         extra: Extra.fromJson(json["extra"]),
         id: json["id"],
         leadershipTitle: (json.containsKey("leadership_title") ? json["leadership_title"] : throw FormatException('Missing required property')),
@@ -122,7 +122,7 @@ class Object {
         senatorClassLabel: senatorClassLabelValues.map[json["senator_class_label"]]!,
         senatorRank: senatorRankValues.map[json["senator_rank"]]!,
         senatorRankLabel: senatorRankLabelValues.map[json["senator_rank_label"]]!,
-        startdate: DateTime.parse(json["startdate"]),
+        startdate: _parseDateTime(json["startdate"]),
         state: json["state"],
         title: titleValues.map[json["title"]]!,
         titleLong: roleTypeLabelValues.map[json["title_long"]]!,
@@ -243,7 +243,7 @@ class Person {
 
     factory Person.fromJson(Map<String, dynamic> json) => Person(
         bioguideid: json["bioguideid"],
-        birthday: DateTime.parse(json["birthday"]),
+        birthday: _parseDateTime(json["birthday"]),
         cspanid: json["cspanid"],
         firstname: json["firstname"],
         gender: genderValues.map[json["gender"]]!,
@@ -395,3 +395,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart
index 3b72bc7..730c806 100644
--- a/base/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/32d5c.json/default/TopLevel.dart
@@ -30,7 +30,7 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        birthDate: (json.containsKey("BirthDate") ? json["BirthDate"] : throw FormatException('Missing required property')) == null ? null : DateTime.parse((json.containsKey("BirthDate") ? json["BirthDate"] : throw FormatException('Missing required property'))),
+        birthDate: (json.containsKey("BirthDate") ? json["BirthDate"] : throw FormatException('Missing required property')) == null ? null : _parseDateTime((json.containsKey("BirthDate") ? json["BirthDate"] : throw FormatException('Missing required property'))),
         birthDateIsProtected: json["BirthDateIsProtected"],
         genderTypeId: json["GenderTypeID"],
         notes: json["Notes"],
@@ -51,3 +51,10 @@ class TopLevel {
         "PreferredName": preferredName,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart
index 79d45ab..f3705af 100644
--- a/base/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/337ed.json/default/TopLevel.dart
@@ -131,11 +131,11 @@ class Result {
         costAbsolute: (json.containsKey("cost_absolute") ? json["cost_absolute"] : throw FormatException('Missing required property')),
         costMax: (json.containsKey("cost_max") ? json["cost_max"] : throw FormatException('Missing required property')),
         costMin: (json.containsKey("cost_min") ? json["cost_min"] : throw FormatException('Missing required property')),
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         customIncomes: List<CustomIncome>.from(json["customIncomes"].map((x) => CustomIncome.fromJson(x))),
         directRepCostsMax: (json.containsKey("direct_rep_costs_max") ? json["direct_rep_costs_max"] : throw FormatException('Missing required property')),
         directRepCostsMin: (json.containsKey("direct_rep_costs_min") ? json["direct_rep_costs_min"] : throw FormatException('Missing required property')),
-        endDate: DateTime.parse(json["end_date"]),
+        endDate: _parseDateTime(json["end_date"]),
         eurSourcesGrants: json["eur_sources_grants"],
         eurSourcesGrantsSrc: (json.containsKey("eur_sources_grants_src") ? json["eur_sources_grants_src"] : throw FormatException('Missing required property')),
         eurSourcesProcurement: json["eur_sources_procurement"],
@@ -151,14 +151,14 @@ class Result {
         publicFinancingNational: (json.containsKey("public_financing_national") ? json["public_financing_national"] : throw FormatException('Missing required property')),
         publicFinancingTotal: (json.containsKey("public_financing_total") ? json["public_financing_total"] : throw FormatException('Missing required property')),
         representative: json["representative"],
-        startDate: DateTime.parse(json["start_date"]),
+        startDate: _parseDateTime(json["start_date"]),
         status: statusValues.map[json["status"]]!,
         totalBudget: (json.containsKey("total_budget") ? json["total_budget"] : throw FormatException('Missing required property')),
         turnoverAbsolute: (json.containsKey("turnover_absolute") ? json["turnover_absolute"] : throw FormatException('Missing required property')),
         turnoverMax: (json.containsKey("turnover_max") ? json["turnover_max"] : throw FormatException('Missing required property')),
         turnoverMin: (json.containsKey("turnover_min") ? json["turnover_min"] : throw FormatException('Missing required property')),
         type: resultTypeValues.map[json["type"]]!,
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -221,12 +221,12 @@ class CustomIncome {
 
     factory CustomIncome.fromJson(Map<String, dynamic> json) => CustomIncome(
         amount: json["amount"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         name: json["name"],
         status: statusValues.map[json["status"]]!,
         type: customIncomeTypeValues.map[json["type"]]!,
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -285,3 +285,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/3659d.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart
index 037c9d2..e37fadf 100644
--- a/base/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/3f1ce.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -435,3 +435,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/43eaf.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/4961a.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/4a0d7.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/4c547.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/4e336.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart
index d16ff46..111202a 100644
--- a/base/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/54d32.json/default/TopLevel.dart
@@ -76,12 +76,12 @@ class Result {
     });
 
     factory Result.fromJson(Map<String, dynamic> json) => Result(
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         personId: json["person_id"],
         representativeId: json["representative_id"],
         status: statusValues.map[json["status"]]!,
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
     );
 
     Map<String, dynamic> toJson() => {
@@ -115,3 +115,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart
index f1df9d0..5dad192 100644
--- a/base/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/5eae5.json/default/TopLevel.dart
@@ -22,7 +22,7 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        date: DateTime.parse(json["Date"]),
+        date: _parseDateTime(json["Date"]),
         id: json["ID"],
         sponsor: json["Sponsor"],
         title: json["Title"],
@@ -35,3 +35,10 @@ class TopLevel {
         "Title": title,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/5f3a1.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/6260a.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart
index c13a826..62199f3 100644
--- a/base/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/65dec.json/default/TopLevel.dart
@@ -45,7 +45,7 @@ class TopLevel {
         mkmId: json["mkm_id"],
         mkmName: json["mkm_name"],
         name: json["name"],
-        releaseDate: DateTime.parse(json["releaseDate"]),
+        releaseDate: _parseDateTime(json["releaseDate"]),
         type: json["type"],
     );
 
@@ -284,7 +284,7 @@ class Ruling {
     });
 
     factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         text: json["text"],
     );
 
@@ -323,3 +323,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart
index 81c258e..132947a 100644
--- a/base/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/6dec6.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -439,3 +439,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/70c77.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart
index 3b467c3..4311d34 100644
--- a/base/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/734ad.json/default/TopLevel.dart
@@ -199,7 +199,7 @@ class Result {
         beOfficeTown: json["be_office_town"],
         codeOfConduct: json["code_of_conduct"],
         contactCountry: json["contact_country"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         entity: json["entity"],
         goals: json["goals"],
         head: json["head"],
@@ -214,7 +214,7 @@ class Result {
         id: json["id"],
         identificationCode: json["identification_code"],
         infoMembers: json["info_members"],
-        lastUpdateDate: DateTime.parse(json["last_update_date"]),
+        lastUpdateDate: _parseDateTime(json["last_update_date"]),
         legal: json["legal"],
         legalStatus: json["legal_status"],
         mainCategory: json["main_category"],
@@ -230,12 +230,12 @@ class Result {
         networking: (json.containsKey("networking") ? json["networking"] : throw FormatException('Missing required property')),
         numberOfNaturalPersons: (json.containsKey("number_of_natural_persons") ? json["number_of_natural_persons"] : throw FormatException('Missing required property')),
         otherCodeOfConduct: (json.containsKey("other_code_of_conduct") ? json["other_code_of_conduct"] : throw FormatException('Missing required property')),
-        registrationDate: DateTime.parse(json["registration_date"]),
+        registrationDate: _parseDateTime(json["registration_date"]),
         status: statusValues.map[json["status"]]!,
         structureMembers: json["structure_members"],
         subCategory: json["sub_category"],
         subCategoryTitle: json["sub_category_title"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
         webSiteUrl: (json.containsKey("web_site_url") ? json["web_site_url"] : throw FormatException('Missing required property')),
     );
@@ -323,3 +323,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/75912.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart
index ea838e5..1c3fe9a 100644
--- a/base/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/77392.json/default/TopLevel.dart
@@ -35,7 +35,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         designation: json["designation"],
-        discoveryDate: DateTime.parse(json["discovery_date"]),
+        discoveryDate: _parseDateTime(json["discovery_date"]),
         hMag: json["h_mag"],
         iDeg: json["i_deg"],
         moidAu: json["moid_au"],
@@ -107,3 +107,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/7dfa6.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart
index 8b7058f..f7c9347 100644
--- a/base/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/7f568.json/default/TopLevel.dart
@@ -49,7 +49,7 @@ class TopLevel {
         comments: json["comments"],
         commentsUrl: json["comments_url"],
         commitsUrl: json["commits_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         description: (json.containsKey("description") ? json["description"] : throw FormatException('Missing required property')),
         files: Map.from(json["files"]).map((k, v) => MapEntry<String, FileValue>(k, FileValue.fromJson(v))),
         forksUrl: json["forks_url"],
@@ -59,7 +59,7 @@ class TopLevel {
         id: json["id"],
         public: json["public"],
         truncated: json["truncated"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         user: (json.containsKey("user") ? json["user"] : throw FormatException('Missing required property')),
     );
@@ -143,3 +143,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart
index 981b80c..dc1c717 100644
--- a/base/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/80aff.json/default/TopLevel.dart
@@ -78,12 +78,12 @@ class Result {
     });
 
     factory Result.fromJson(Map<String, dynamic> json) => Result(
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         items: json["items"],
         name: json["name"],
         parent: (json.containsKey("parent") ? json["parent"] : throw FormatException('Missing required property')),
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -97,3 +97,10 @@ class Result {
         "uri": uri,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/88130.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/8a62c.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/9617f.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/9929c.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart
index 4302fb8..f143cc6 100644
--- a/base/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/9ac3b.json/default/TopLevel.dart
@@ -86,7 +86,7 @@ class Result {
     });
 
     factory Result.fromJson(Map<String, dynamic> json) => Result(
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         entity: json["entity"],
         firstName: json["first_name"],
         id: json["id"],
@@ -95,7 +95,7 @@ class Result {
         position: (json.containsKey("position") ? json["position"] : throw FormatException('Missing required property')),
         status: statusValues.map[json["status"]]!,
         title: (json.containsKey("title") ? json["title"] : throw FormatException('Missing required property')) == null ? null : titleValues.map[(json.containsKey("title") ? json["title"] : throw FormatException('Missing required property'))]!,
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -145,3 +145,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart
index aedf8b2..62198c0 100644
--- a/base/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/a0496.json/default/TopLevel.dart
@@ -55,15 +55,15 @@ class TopLevel {
         displayUrl: json["display_url"],
         errors: Errors.fromJson(json["errors"]),
         frequency: json["frequency"],
-        fromDate: DateTime.parse(json["from_date"]),
+        fromDate: _parseDateTime(json["from_date"]),
         id: json["id"],
         name: json["name"],
         premium: json["premium"],
         sourceCode: json["source_code"],
         sourceName: json["source_name"],
-        toDate: DateTime.parse(json["to_date"]),
+        toDate: _parseDateTime(json["to_date"]),
         type: json["type"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         urlizeName: json["urlize_name"],
     );
 
@@ -97,3 +97,10 @@ class Errors {
     Map<String, dynamic> toJson() => {
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/a1eca.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/a9691.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/abb4b.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/ac944.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart
index 85cc95e..6371d1f 100644
--- a/base/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/b4865.json/default/TopLevel.dart
@@ -49,7 +49,7 @@ class TopLevel {
         recclass: json["recclass"],
         reclat: json["reclat"],
         reclong: json["reclong"],
-        year: json["year"] == null ? null : DateTime.parse(json["year"]),
+        year: json["year"] == null ? null : _parseDateTime(json["year"]),
     );
 
     Map<String, dynamic> toJson() => {
@@ -125,3 +125,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/b6f2c.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/bb1ec.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/cd463.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/cf0d8.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart
index 53de3be..9e534d4 100644
--- a/base/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/cfbce.json/default/TopLevel.dart
@@ -21,7 +21,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         base: json["base"],
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         rates: Map.from(json["rates"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "rates": Map.from(rates).map((k, v) => MapEntry<String, dynamic>(k, v)),
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart
index 2997551..b135c22 100644
--- a/base/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/d0908.json/default/TopLevel.dart
@@ -34,7 +34,7 @@ class TotalPopulation {
     });
 
     factory TotalPopulation.fromJson(Map<String, dynamic> json) => TotalPopulation(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         population: json["population"],
     );
 
@@ -43,3 +43,10 @@ class TotalPopulation {
         "population": population,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart
index fc0a910..a45006b 100644
--- a/base/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/d23d5.json/default/TopLevel.dart
@@ -77,10 +77,10 @@ class Result {
 
     factory Result.fromJson(Map<String, dynamic> json) => Result(
         acronym: (json.containsKey("acronym") ? json["acronym"] : throw FormatException('Missing required property')),
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         name: json["name"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         uri: json["uri"],
     );
 
@@ -93,3 +93,10 @@ class Result {
         "uri": uri,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart
index 157027f..73bb458 100644
--- a/base/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/dbfb3.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -437,3 +437,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart
index d67ad5c..74c692d 100644
--- a/base/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/dc44f.json/default/TopLevel.dart
@@ -45,7 +45,7 @@ class TopLevel {
         mkmId: json["mkm_id"],
         mkmName: json["mkm_name"],
         name: json["name"],
-        releaseDate: DateTime.parse(json["releaseDate"]),
+        releaseDate: _parseDateTime(json["releaseDate"]),
         type: json["type"],
     );
 
@@ -358,7 +358,7 @@ class Ruling {
     });
 
     factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         text: json["text"],
     );
 
@@ -405,3 +405,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart
index d67ad5c..74c692d 100644
--- a/base/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/dd1ce.json/default/TopLevel.dart
@@ -45,7 +45,7 @@ class TopLevel {
         mkmId: json["mkm_id"],
         mkmName: json["mkm_name"],
         name: json["name"],
-        releaseDate: DateTime.parse(json["releaseDate"]),
+        releaseDate: _parseDateTime(json["releaseDate"]),
         type: json["type"],
     );
 
@@ -358,7 +358,7 @@ class Ruling {
     });
 
     factory Ruling.fromJson(Map<String, dynamic> json) => Ruling(
-        date: DateTime.parse(json["date"]),
+        date: _parseDateTime(json["date"]),
         text: json["text"],
     );
 
@@ -405,3 +405,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart
index ea6fc77..8eed1d3 100644
--- a/base/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/df957.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -415,3 +415,10 @@ class Wind {
         "speed": speed,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart b/head/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart
index d1d3b2a..356108c 100644
--- a/base/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/misc/e2915.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Query {
 
     factory Query.fromJson(Map<String, dynamic> json) => Query(
         count: json["count"],
-        created: DateTime.parse(json["created"]),
+        created: _parseDateTime(json["created"]),
         lang: json["lang"],
         results: Results.fromJson(json["results"]),
     );
@@ -435,3 +435,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/priority/bug2590.json/default/TopLevel.dart b/head/dart/test/inputs/json/priority/bug2590.json/default/TopLevel.dart
index c7bdea7..dce2f9a 100644
--- a/base/dart/test/inputs/json/priority/bug2590.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/priority/bug2590.json/default/TopLevel.dart
@@ -36,8 +36,8 @@ class Invoice {
     });
 
     factory Invoice.fromJson(Map<String, dynamic> json) => Invoice(
-        createdAt: (json.containsKey("createdAt") ? json["createdAt"] : throw FormatException('Missing required property')) == null ? null : DateTime.parse((json.containsKey("createdAt") ? json["createdAt"] : throw FormatException('Missing required property'))),
-        dueDate: (json.containsKey("dueDate") ? json["dueDate"] : throw FormatException('Missing required property')) == null ? null : DateTime.parse((json.containsKey("dueDate") ? json["dueDate"] : throw FormatException('Missing required property'))),
+        createdAt: (json.containsKey("createdAt") ? json["createdAt"] : throw FormatException('Missing required property')) == null ? null : _parseDateTime((json.containsKey("createdAt") ? json["createdAt"] : throw FormatException('Missing required property'))),
+        dueDate: (json.containsKey("dueDate") ? json["dueDate"] : throw FormatException('Missing required property')) == null ? null : _parseDateTime((json.containsKey("dueDate") ? json["dueDate"] : throw FormatException('Missing required property'))),
         name: json["name"],
     );
 
@@ -47,3 +47,10 @@ class Invoice {
         "name": name,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/priority/bug2663.json/default/TopLevel.dart b/head/dart/test/inputs/json/priority/bug2663.json/default/TopLevel.dart
index d7ff528..2955699 100644
--- a/base/dart/test/inputs/json/priority/bug2663.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/priority/bug2663.json/default/TopLevel.dart
@@ -20,8 +20,8 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        birthday: DateTime.parse(json["birthday"]),
-        lastSeen: DateTime.parse(json["lastSeen"]),
+        birthday: _parseDateTime(json["birthday"]),
+        lastSeen: _parseDateTime(json["lastSeen"]),
         name: json["name"],
     );
 
@@ -31,3 +31,10 @@ class TopLevel {
         "name": name,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/priority/keywords.json/default/TopLevel.dart b/head/dart/test/inputs/json/priority/keywords.json/default/TopLevel.dart
index c5f7f58..dc2fe3f 100644
--- a/base/dart/test/inputs/json/priority/keywords.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/priority/keywords.json/default/TopLevel.dart
@@ -1688,7 +1688,7 @@ class DateTimeClass {
     });
 
     factory DateTimeClass.fromJson(Map<String, dynamic> json) => DateTimeClass(
-        dateTime: DateTime.parse(json["DateTime"]),
+        dateTime: _parseDateTime(json["DateTime"]),
     );
 
     Map<String, dynamic> toJson() => {
@@ -6805,3 +6805,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/samples/github-events.json/default/TopLevel.dart b/head/dart/test/inputs/json/samples/github-events.json/default/TopLevel.dart
index 36e1339..c2bb86f 100644
--- a/base/dart/test/inputs/json/samples/github-events.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/samples/github-events.json/default/TopLevel.dart
@@ -31,7 +31,7 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         actor: Actor.fromJson(json["actor"]),
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         id: json["id"],
         org: json["org"] == null ? null : Actor.fromJson(json["org"]),
         payload: Payload.fromJson(json["payload"]),
@@ -187,11 +187,11 @@ class Comment {
 
     factory Comment.fromJson(Map<String, dynamic> json) => Comment(
         body: json["body"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         htmlUrl: json["html_url"],
         id: json["id"],
         issueUrl: json["issue_url"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         user: User.fromJson(json["user"]),
     );
@@ -403,10 +403,10 @@ class Issue {
         assignee: (json.containsKey("assignee") ? json["assignee"] : throw FormatException('Missing required property')),
         assignees: List<dynamic>.from(json["assignees"].map((x) => x)),
         body: json["body"],
-        closedAt: (json.containsKey("closed_at") ? json["closed_at"] : throw FormatException('Missing required property')) == null ? null : DateTime.parse((json.containsKey("closed_at") ? json["closed_at"] : throw FormatException('Missing required property'))),
+        closedAt: (json.containsKey("closed_at") ? json["closed_at"] : throw FormatException('Missing required property')) == null ? null : _parseDateTime((json.containsKey("closed_at") ? json["closed_at"] : throw FormatException('Missing required property'))),
         comments: json["comments"],
         commentsUrl: json["comments_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         eventsUrl: json["events_url"],
         htmlUrl: json["html_url"],
         id: json["id"],
@@ -419,7 +419,7 @@ class Issue {
         repositoryUrl: json["repository_url"],
         state: json["state"],
         title: json["title"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         user: User.fromJson(json["user"]),
     );
@@ -520,10 +520,10 @@ class Milestone {
     factory Milestone.fromJson(Map<String, dynamic> json) => Milestone(
         closedAt: (json.containsKey("closed_at") ? json["closed_at"] : throw FormatException('Missing required property')),
         closedIssues: json["closed_issues"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         creator: User.fromJson(json["creator"]),
         description: json["description"],
-        dueOn: (json.containsKey("due_on") ? json["due_on"] : throw FormatException('Missing required property')) == null ? null : DateTime.parse((json.containsKey("due_on") ? json["due_on"] : throw FormatException('Missing required property'))),
+        dueOn: (json.containsKey("due_on") ? json["due_on"] : throw FormatException('Missing required property')) == null ? null : _parseDateTime((json.containsKey("due_on") ? json["due_on"] : throw FormatException('Missing required property'))),
         htmlUrl: json["html_url"],
         id: json["id"],
         labelsUrl: json["labels_url"],
@@ -531,7 +531,7 @@ class Milestone {
         openIssues: json["open_issues"],
         state: json["state"],
         title: json["title"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
     );
 
@@ -676,12 +676,12 @@ class PayloadPullRequest {
         base: Base.fromJson(json["base"]),
         body: json["body"],
         changedFiles: json["changed_files"],
-        closedAt: DateTime.parse(json["closed_at"]),
+        closedAt: _parseDateTime(json["closed_at"]),
         comments: json["comments"],
         commentsUrl: json["comments_url"],
         commits: json["commits"],
         commitsUrl: json["commits_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         deletions: json["deletions"],
         diffUrl: json["diff_url"],
         head: Base.fromJson(json["head"]),
@@ -695,7 +695,7 @@ class PayloadPullRequest {
         mergeable: (json.containsKey("mergeable") ? json["mergeable"] : throw FormatException('Missing required property')),
         mergeableState: json["mergeable_state"],
         merged: json["merged"],
-        mergedAt: DateTime.parse(json["merged_at"]),
+        mergedAt: _parseDateTime(json["merged_at"]),
         mergedBy: User.fromJson(json["merged_by"]),
         milestone: (json.containsKey("milestone") ? json["milestone"] : throw FormatException('Missing required property')),
         number: json["number"],
@@ -708,7 +708,7 @@ class PayloadPullRequest {
         state: json["state"],
         statusesUrl: json["statuses_url"],
         title: json["title"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         user: User.fromJson(json["user"]),
     );
@@ -945,7 +945,7 @@ class BaseRepo {
         compareUrl: json["compare_url"],
         contentsUrl: json["contents_url"],
         contributorsUrl: json["contributors_url"],
-        createdAt: DateTime.parse(json["created_at"]),
+        createdAt: _parseDateTime(json["created_at"]),
         defaultBranch: json["default_branch"],
         deploymentsUrl: json["deployments_url"],
         description: json["description"],
@@ -986,7 +986,7 @@ class BaseRepo {
         owner: User.fromJson(json["owner"]),
         private: json["private"],
         pullsUrl: json["pulls_url"],
-        pushedAt: DateTime.parse(json["pushed_at"]),
+        pushedAt: _parseDateTime(json["pushed_at"]),
         releasesUrl: json["releases_url"],
         size: json["size"],
         sshUrl: json["ssh_url"],
@@ -999,7 +999,7 @@ class BaseRepo {
         tagsUrl: json["tags_url"],
         teamsUrl: json["teams_url"],
         treesUrl: json["trees_url"],
-        updatedAt: DateTime.parse(json["updated_at"]),
+        updatedAt: _parseDateTime(json["updated_at"]),
         url: json["url"],
         watchers: json["watchers"],
         watchersCount: json["watchers_count"],
@@ -1173,3 +1173,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/samples/null-safe.json/default/TopLevel.dart b/head/dart/test/inputs/json/samples/null-safe.json/default/TopLevel.dart
index 2a0496c..1b1216d 100644
--- a/base/dart/test/inputs/json/samples/null-safe.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/samples/null-safe.json/default/TopLevel.dart
@@ -39,7 +39,7 @@ class Item {
 
     factory Item.fromJson(Map<String, dynamic> json) => Item(
         address: json["address"] == null ? null : Address.fromJson(json["address"]),
-        createdAt: json["created_at"] == null ? null : DateTime.parse(json["created_at"]),
+        createdAt: json["created_at"] == null ? null : _parseDateTime(json["created_at"]),
         name: json["name"],
         sex: (json.containsKey("sex") ? json["sex"] : throw FormatException('Missing required property')),
     );
@@ -75,3 +75,10 @@ class Address {
         "street": street,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/dart/test/inputs/json/samples/us-senators.json/default/TopLevel.dart b/head/dart/test/inputs/json/samples/us-senators.json/default/TopLevel.dart
index 2457ce0..cfd3eef 100644
--- a/base/dart/test/inputs/json/samples/us-senators.json/default/TopLevel.dart
+++ b/head/dart/test/inputs/json/samples/us-senators.json/default/TopLevel.dart
@@ -107,7 +107,7 @@ class Object {
         current: json["current"],
         description: json["description"],
         district: (json.containsKey("district") ? json["district"] : throw FormatException('Missing required property')),
-        enddate: DateTime.parse(json["enddate"]),
+        enddate: _parseDateTime(json["enddate"]),
         extra: Extra.fromJson(json["extra"]),
         leadershipTitle: (json.containsKey("leadership_title") ? json["leadership_title"] : throw FormatException('Missing required property')),
         party: partyValues.map[json["party"]]!,
@@ -119,7 +119,7 @@ class Object {
         senatorClassLabel: senatorClassLabelValues.map[json["senator_class_label"]]!,
         senatorRank: senatorRankValues.map[json["senator_rank"]]!,
         senatorRankLabel: senatorRankLabelValues.map[json["senator_rank_label"]]!,
-        startdate: DateTime.parse(json["startdate"]),
+        startdate: _parseDateTime(json["startdate"]),
         state: json["state"],
         title: titleValues.map[json["title"]]!,
         titleLong: roleTypeLabelValues.map[json["title_long"]]!,
@@ -237,7 +237,7 @@ class Person {
 
     factory Person.fromJson(Map<String, dynamic> json) => Person(
         bioguideid: json["bioguideid"],
-        birthday: DateTime.parse(json["birthday"]),
+        birthday: _parseDateTime(json["birthday"]),
         cspanid: json["cspanid"],
         firstname: json["firstname"],
         gender: genderValues.map[json["gender"]]!,
@@ -387,3 +387,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/flow/test/inputs/json/misc/00c36.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/00c36.json/default/TopLevel.js
index 162dbc2..0e71c74 100644
--- a/base/flow/test/inputs/json/misc/00c36.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/00c36.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/00ec5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/00ec5.json/default/TopLevel.js
index 4d45847..9543b68 100644
--- a/base/flow/test/inputs/json/misc/00ec5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/00ec5.json/default/TopLevel.js
@@ -163,10 +163,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/010b1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/010b1.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/010b1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/010b1.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/016af.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/016af.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/016af.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/016af.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/033b1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/033b1.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/033b1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/033b1.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/050b0.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/050b0.json/default/TopLevel.js
index 6c1c8a4..aadf320 100644
--- a/base/flow/test/inputs/json/misc/050b0.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/050b0.json/default/TopLevel.js
@@ -152,10 +152,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/06bee.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/06bee.json/default/TopLevel.js
index e124161..50e5e2a 100644
--- a/base/flow/test/inputs/json/misc/06bee.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/06bee.json/default/TopLevel.js
@@ -140,10 +140,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/07540.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/07540.json/default/TopLevel.js
index d9826f0..cce4f36 100644
--- a/base/flow/test/inputs/json/misc/07540.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/07540.json/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0779f.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0779f.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/0779f.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0779f.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/07c75.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/07c75.json/default/TopLevel.js
index a298561..bd2f506 100644
--- a/base/flow/test/inputs/json/misc/07c75.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/07c75.json/default/TopLevel.js
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/09f54.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/09f54.json/default/TopLevel.js
index 1eccbad..01b739f 100644
--- a/base/flow/test/inputs/json/misc/09f54.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/09f54.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0a358.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0a358.json/default/TopLevel.js
index fdf8c01..2acafe7 100644
--- a/base/flow/test/inputs/json/misc/0a358.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0a358.json/default/TopLevel.js
@@ -114,10 +114,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0a91a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0a91a.json/default/TopLevel.js
index 82bc4f2..f4a17a2 100644
--- a/base/flow/test/inputs/json/misc/0a91a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0a91a.json/default/TopLevel.js
@@ -316,10 +316,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0b91a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0b91a.json/default/TopLevel.js
index 209fdf8..eaf5088 100644
--- a/base/flow/test/inputs/json/misc/0b91a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0b91a.json/default/TopLevel.js
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0cffa.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0cffa.json/default/TopLevel.js
index 9b7923c..f3c332f 100644
--- a/base/flow/test/inputs/json/misc/0cffa.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0cffa.json/default/TopLevel.js
@@ -211,10 +211,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0e0c2.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
index 407cad3..8a54859 100644
--- a/base/flow/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
@@ -173,10 +173,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/0fecf.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/0fecf.json/default/TopLevel.js
index 3ee24ee..0c6e5e2 100644
--- a/base/flow/test/inputs/json/misc/0fecf.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/0fecf.json/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/10be4.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/10be4.json/default/TopLevel.js
index 63eecca..eb467d0 100644
--- a/base/flow/test/inputs/json/misc/10be4.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/10be4.json/default/TopLevel.js
@@ -163,10 +163,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/112b5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/112b5.json/default/TopLevel.js
index f9cab5b..6cc4baf 100644
--- a/base/flow/test/inputs/json/misc/112b5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/112b5.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/127a1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/127a1.json/default/TopLevel.js
index 3e28e99..24b0977 100644
--- a/base/flow/test/inputs/json/misc/127a1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/127a1.json/default/TopLevel.js
@@ -210,10 +210,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/13d8d.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/13d8d.json/default/TopLevel.js
index 48593f5..cfac139 100644
--- a/base/flow/test/inputs/json/misc/13d8d.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/13d8d.json/default/TopLevel.js
@@ -122,10 +122,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/14d38.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/14d38.json/default/TopLevel.js
index 713e56b..ac1d312 100644
--- a/base/flow/test/inputs/json/misc/14d38.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/14d38.json/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/167d6.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/167d6.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/167d6.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/167d6.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/16bc5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/16bc5.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/16bc5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/16bc5.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/176f1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/176f1.json/default/TopLevel.js
index db78db6..9bc9138 100644
--- a/base/flow/test/inputs/json/misc/176f1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/176f1.json/default/TopLevel.js
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/1a7f5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/1b28c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/1b28c.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/1b28c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/1b28c.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/1b409.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/1b409.json/default/TopLevel.js
index 56b0139..8f81ed5 100644
--- a/base/flow/test/inputs/json/misc/1b409.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/1b409.json/default/TopLevel.js
@@ -187,10 +187,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/2465e.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/2465e.json/default/TopLevel.js
index e283f26..c20e7dd 100644
--- a/base/flow/test/inputs/json/misc/2465e.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/2465e.json/default/TopLevel.js
@@ -169,10 +169,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/24f52.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/24f52.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/24f52.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/24f52.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/262f0.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/262f0.json/default/TopLevel.js
index 1dc4430..7e5b3b3 100644
--- a/base/flow/test/inputs/json/misc/262f0.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/262f0.json/default/TopLevel.js
@@ -199,10 +199,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/26b49.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/26b49.json/default/TopLevel.js
index c9ba533..23e8c62 100644
--- a/base/flow/test/inputs/json/misc/26b49.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/26b49.json/default/TopLevel.js
@@ -208,10 +208,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/26c9c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/26c9c.json/default/TopLevel.js
index d4b28ed..c060755 100644
--- a/base/flow/test/inputs/json/misc/26c9c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/26c9c.json/default/TopLevel.js
@@ -283,10 +283,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/27332.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/27332.json/default/TopLevel.js
index 934296a..d6bb007 100644
--- a/base/flow/test/inputs/json/misc/27332.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/27332.json/default/TopLevel.js
@@ -249,10 +249,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/29f47.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/29f47.json/default/TopLevel.js
index 6c6029e..0a117e0 100644
--- a/base/flow/test/inputs/json/misc/29f47.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/29f47.json/default/TopLevel.js
@@ -235,10 +235,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/2d4e2.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
index 50f7c40..3ee6c8f 100644
--- a/base/flow/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
@@ -203,10 +203,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/2df80.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/2df80.json/default/TopLevel.js
index e8a7f8a..18862c1 100644
--- a/base/flow/test/inputs/json/misc/2df80.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/2df80.json/default/TopLevel.js
@@ -169,10 +169,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/31189.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/31189.json/default/TopLevel.js
index 4fb8245..1c659a2 100644
--- a/base/flow/test/inputs/json/misc/31189.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/31189.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/32431.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/32431.json/default/TopLevel.js
index 9b836ab..654a594 100644
--- a/base/flow/test/inputs/json/misc/32431.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/32431.json/default/TopLevel.js
@@ -167,10 +167,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/32d5c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/32d5c.json/default/TopLevel.js
index 8f57115..79919b5 100644
--- a/base/flow/test/inputs/json/misc/32d5c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/32d5c.json/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/337ed.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/337ed.json/default/TopLevel.js
index 400a636..d6362df 100644
--- a/base/flow/test/inputs/json/misc/337ed.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/337ed.json/default/TopLevel.js
@@ -164,10 +164,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/33d2e.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/33d2e.json/default/TopLevel.js
index 954c924..ed1e926 100644
--- a/base/flow/test/inputs/json/misc/33d2e.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/33d2e.json/default/TopLevel.js
@@ -149,10 +149,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/34702.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/34702.json/default/TopLevel.js
index f14ce92..25756ac 100644
--- a/base/flow/test/inputs/json/misc/34702.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/34702.json/default/TopLevel.js
@@ -184,10 +184,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/3536b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/3536b.json/default/TopLevel.js
index 4c5794e..4f56c1f 100644
--- a/base/flow/test/inputs/json/misc/3536b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/3536b.json/default/TopLevel.js
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/3659d.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/3659d.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/3659d.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/3659d.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/36d5d.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/36d5d.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/36d5d.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/36d5d.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/3a6b3.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/3e9a3.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
index db78db6..9bc9138 100644
--- a/base/flow/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/3f1ce.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
index 870cf6a..db7ef24 100644
--- a/base/flow/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
@@ -197,10 +197,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/421d4.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/421d4.json/default/TopLevel.js
index 5d852e7..30b31c6 100644
--- a/base/flow/test/inputs/json/misc/421d4.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/421d4.json/default/TopLevel.js
@@ -210,10 +210,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/437e7.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/437e7.json/default/TopLevel.js
index 46aad64..257be66 100644
--- a/base/flow/test/inputs/json/misc/437e7.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/437e7.json/default/TopLevel.js
@@ -205,10 +205,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/43970.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/43970.json/default/TopLevel.js
index 96da4f2..62e976e 100644
--- a/base/flow/test/inputs/json/misc/43970.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/43970.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/43eaf.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/43eaf.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/43eaf.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/43eaf.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/458db.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/458db.json/default/TopLevel.js
index 602758a..1b3e740 100644
--- a/base/flow/test/inputs/json/misc/458db.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/458db.json/default/TopLevel.js
@@ -138,10 +138,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4961a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4961a.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/4961a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4961a.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4a0d7.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4a455.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4a455.json/default/TopLevel.js
index af5a140..6770476 100644
--- a/base/flow/test/inputs/json/misc/4a455.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4a455.json/default/TopLevel.js
@@ -139,10 +139,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4c547.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4c547.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/4c547.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4c547.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4d6fb.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
index e9dc36d..d9871d9 100644
--- a/base/flow/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
@@ -244,10 +244,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/4e336.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/4e336.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/4e336.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/4e336.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/54147.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/54147.json/default/TopLevel.js
index ebba231..13ea528 100644
--- a/base/flow/test/inputs/json/misc/54147.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/54147.json/default/TopLevel.js
@@ -112,10 +112,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/54d32.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/54d32.json/default/TopLevel.js
index d884bb6..fd88d22 100644
--- a/base/flow/test/inputs/json/misc/54d32.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/54d32.json/default/TopLevel.js
@@ -118,10 +118,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/570ec.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/570ec.json/default/TopLevel.js
index df6a35e..7eedb90 100644
--- a/base/flow/test/inputs/json/misc/570ec.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/570ec.json/default/TopLevel.js
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/5dd0d.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/5eae5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/5eae5.json/default/TopLevel.js
index 2d34873..3719239 100644
--- a/base/flow/test/inputs/json/misc/5eae5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/5eae5.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/5eb20.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/5eb20.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/5eb20.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/5eb20.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/5f3a1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/5f7fe.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
index e0c97d0..01d4959 100644
--- a/base/flow/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
@@ -284,10 +284,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/617e8.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/617e8.json/default/TopLevel.js
index 772ffb1..ad95273 100644
--- a/base/flow/test/inputs/json/misc/617e8.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/617e8.json/default/TopLevel.js
@@ -283,10 +283,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/61b66.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/61b66.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/61b66.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/61b66.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6260a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6260a.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/6260a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6260a.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/65dec.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/65dec.json/default/TopLevel.js
index 5439a46..7495466 100644
--- a/base/flow/test/inputs/json/misc/65dec.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/65dec.json/default/TopLevel.js
@@ -183,10 +183,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/66121.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/66121.json/default/TopLevel.js
index e1199ed..4701bbb 100644
--- a/base/flow/test/inputs/json/misc/66121.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/66121.json/default/TopLevel.js
@@ -140,10 +140,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6617c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6617c.json/default/TopLevel.js
index 2c7f4a6..b7ac429 100644
--- a/base/flow/test/inputs/json/misc/6617c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6617c.json/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/67c03.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/67c03.json/default/TopLevel.js
index d156dcd..9b6e364 100644
--- a/base/flow/test/inputs/json/misc/67c03.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/67c03.json/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/68c30.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/68c30.json/default/TopLevel.js
index 46cf69f..12b467f 100644
--- a/base/flow/test/inputs/json/misc/68c30.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/68c30.json/default/TopLevel.js
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6c155.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6c155.json/default/TopLevel.js
index c7e4986..a8bc970 100644
--- a/base/flow/test/inputs/json/misc/6c155.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6c155.json/default/TopLevel.js
@@ -149,10 +149,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6de06.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6de06.json/default/TopLevel.js
index 7b5ef08..f246880 100644
--- a/base/flow/test/inputs/json/misc/6de06.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6de06.json/default/TopLevel.js
@@ -244,10 +244,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6dec6.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6dec6.json/default/TopLevel.js
index 3c0767b..917d91b 100644
--- a/base/flow/test/inputs/json/misc/6dec6.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6dec6.json/default/TopLevel.js
@@ -199,10 +199,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/6eb00.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/6eb00.json/default/TopLevel.js
index 7d2b1cf..dceceb2 100644
--- a/base/flow/test/inputs/json/misc/6eb00.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/6eb00.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/70c77.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/70c77.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/70c77.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/70c77.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/734ad.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/734ad.json/default/TopLevel.js
index 1966444..4e28aa3 100644
--- a/base/flow/test/inputs/json/misc/734ad.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/734ad.json/default/TopLevel.js
@@ -170,10 +170,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/75912.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/75912.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/75912.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/75912.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7681c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7681c.json/default/TopLevel.js
index 5ffad09..4368ba2 100644
--- a/base/flow/test/inputs/json/misc/7681c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7681c.json/default/TopLevel.js
@@ -212,10 +212,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/76ae1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/76ae1.json/default/TopLevel.js
index f4001ff..391dd6e 100644
--- a/base/flow/test/inputs/json/misc/76ae1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/76ae1.json/default/TopLevel.js
@@ -280,10 +280,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/77392.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/77392.json/default/TopLevel.js
index ec26653..90aea47 100644
--- a/base/flow/test/inputs/json/misc/77392.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/77392.json/default/TopLevel.js
@@ -123,10 +123,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7d397.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7d397.json/default/TopLevel.js
index daed49b..5c7bf60 100644
--- a/base/flow/test/inputs/json/misc/7d397.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7d397.json/default/TopLevel.js
@@ -171,10 +171,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7d722.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7d722.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/7d722.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7d722.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7df41.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7df41.json/default/TopLevel.js
index 46994ca..31a9cb6 100644
--- a/base/flow/test/inputs/json/misc/7df41.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7df41.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7dfa6.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7eb30.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7eb30.json/default/TopLevel.js
index 5932680..35b206f 100644
--- a/base/flow/test/inputs/json/misc/7eb30.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7eb30.json/default/TopLevel.js
@@ -140,10 +140,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7f568.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7f568.json/default/TopLevel.js
index 6f21818..7e7520c 100644
--- a/base/flow/test/inputs/json/misc/7f568.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7f568.json/default/TopLevel.js
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/7fbfb.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
index d84d9a6..de694c7 100644
--- a/base/flow/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/80aff.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/80aff.json/default/TopLevel.js
index f58d28c..4ecb7b6 100644
--- a/base/flow/test/inputs/json/misc/80aff.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/80aff.json/default/TopLevel.js
@@ -115,10 +115,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/82509.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/82509.json/default/TopLevel.js
index 12cc75e..4963282 100644
--- a/base/flow/test/inputs/json/misc/82509.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/82509.json/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/8592b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/8592b.json/default/TopLevel.js
index 6ba8b46..9927a1f 100644
--- a/base/flow/test/inputs/json/misc/8592b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/8592b.json/default/TopLevel.js
@@ -219,10 +219,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/88130.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/88130.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/88130.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/88130.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/8a62c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/8a62c.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/8a62c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/8a62c.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/908db.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/908db.json/default/TopLevel.js
index 0a7d4d3..8a06165 100644
--- a/base/flow/test/inputs/json/misc/908db.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/908db.json/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9617f.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9617f.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/9617f.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9617f.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/96f7c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/96f7c.json/default/TopLevel.js
index ef14be8..c0df6d4 100644
--- a/base/flow/test/inputs/json/misc/96f7c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/96f7c.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9847b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9847b.json/default/TopLevel.js
index 6533855..1886171 100644
--- a/base/flow/test/inputs/json/misc/9847b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9847b.json/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9929c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9929c.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/9929c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9929c.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/996bd.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/996bd.json/default/TopLevel.js
index f298931..96a33e7 100644
--- a/base/flow/test/inputs/json/misc/996bd.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/996bd.json/default/TopLevel.js
@@ -140,10 +140,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9a503.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9a503.json/default/TopLevel.js
index 7a5b1c5..cbd1fd0 100644
--- a/base/flow/test/inputs/json/misc/9a503.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9a503.json/default/TopLevel.js
@@ -126,10 +126,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9ac3b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
index be0be36..bec1ab8 100644
--- a/base/flow/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/9eed5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/9eed5.json/default/TopLevel.js
index 83fa291..9feaaab 100644
--- a/base/flow/test/inputs/json/misc/9eed5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/9eed5.json/default/TopLevel.js
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a0496.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a0496.json/default/TopLevel.js
index 5725050..d9a219f 100644
--- a/base/flow/test/inputs/json/misc/a0496.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a0496.json/default/TopLevel.js
@@ -117,10 +117,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a1eca.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a1eca.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/a1eca.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a1eca.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a3d8c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
index 43e579f..7cd37eb 100644
--- a/base/flow/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
@@ -212,10 +212,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a45b0.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a45b0.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/a45b0.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a45b0.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a71df.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a71df.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/a71df.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a71df.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/a9691.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/a9691.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/a9691.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/a9691.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ab0d1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/abb4b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/abb4b.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/abb4b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/abb4b.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ac944.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ac944.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/ac944.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ac944.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ad8be.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ad8be.json/default/TopLevel.js
index 63eecca..eb467d0 100644
--- a/base/flow/test/inputs/json/misc/ad8be.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ad8be.json/default/TopLevel.js
@@ -163,10 +163,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ae7f0.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
index f6846b2..1f0bde1 100644
--- a/base/flow/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
@@ -193,10 +193,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ae9ca.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
index 670c8dd..12bb806 100644
--- a/base/flow/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
@@ -142,10 +142,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/af2d1.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/af2d1.json/default/TopLevel.js
index a3bad4d..8591a30 100644
--- a/base/flow/test/inputs/json/misc/af2d1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/af2d1.json/default/TopLevel.js
@@ -204,10 +204,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/b4865.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/b4865.json/default/TopLevel.js
index c90ee85..979e0b9 100644
--- a/base/flow/test/inputs/json/misc/b4865.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/b4865.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/b6f2c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/b6fe5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
index e38f3a8..a65da14 100644
--- a/base/flow/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/b9f64.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/b9f64.json/default/TopLevel.js
index 8fa46b9..70249ff 100644
--- a/base/flow/test/inputs/json/misc/b9f64.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/b9f64.json/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/bb1ec.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/be234.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/be234.json/default/TopLevel.js
index 0cb3e64..cf8697b 100644
--- a/base/flow/test/inputs/json/misc/be234.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/be234.json/default/TopLevel.js
@@ -258,10 +258,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/c0356.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/c0356.json/default/TopLevel.js
index c715046..9175274 100644
--- a/base/flow/test/inputs/json/misc/c0356.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/c0356.json/default/TopLevel.js
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/c0a3a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/c3303.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/c3303.json/default/TopLevel.js
index c0554e5..48880ae 100644
--- a/base/flow/test/inputs/json/misc/c3303.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/c3303.json/default/TopLevel.js
@@ -209,10 +209,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/c6cfd.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
index ff97c25..a20feb4 100644
--- a/base/flow/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/c8c7e.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
index 2655a97..c400a46 100644
--- a/base/flow/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cb0cc.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
index 1ae3eae..094ca42 100644
--- a/base/flow/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
@@ -119,10 +119,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cb81e.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cb81e.json/default/TopLevel.js
index d6a0df8..3e2ebc1 100644
--- a/base/flow/test/inputs/json/misc/cb81e.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cb81e.json/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ccd18.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ccd18.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/ccd18.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ccd18.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cd238.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cd238.json/default/TopLevel.js
index c7ac2de..f070002 100644
--- a/base/flow/test/inputs/json/misc/cd238.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cd238.json/default/TopLevel.js
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cd463.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cd463.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/cd463.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cd463.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cda6c.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cda6c.json/default/TopLevel.js
index bb61a30..1e455ed 100644
--- a/base/flow/test/inputs/json/misc/cda6c.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cda6c.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cf0d8.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/cfbce.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/cfbce.json/default/TopLevel.js
index 3bb973a..7f8b227 100644
--- a/base/flow/test/inputs/json/misc/cfbce.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/cfbce.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/d0908.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/d0908.json/default/TopLevel.js
index 6cc839f..db5355d 100644
--- a/base/flow/test/inputs/json/misc/d0908.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/d0908.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/d23d5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/d23d5.json/default/TopLevel.js
index 61d1e3f..21b87d9 100644
--- a/base/flow/test/inputs/json/misc/d23d5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/d23d5.json/default/TopLevel.js
@@ -114,10 +114,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/dbfb3.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
index 91a80f8..e2ebf51 100644
--- a/base/flow/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
@@ -198,10 +198,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/dc44f.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/dc44f.json/default/TopLevel.js
index ff5cb85..5059b79 100644
--- a/base/flow/test/inputs/json/misc/dc44f.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/dc44f.json/default/TopLevel.js
@@ -222,10 +222,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/dd1ce.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
index ff5cb85..5059b79 100644
--- a/base/flow/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
@@ -222,10 +222,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/dec3a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/dec3a.json/default/TopLevel.js
index 2eed152..0d78187 100644
--- a/base/flow/test/inputs/json/misc/dec3a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/dec3a.json/default/TopLevel.js
@@ -157,10 +157,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/df957.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/df957.json/default/TopLevel.js
index 6dba12d..2a845c9 100644
--- a/base/flow/test/inputs/json/misc/df957.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/df957.json/default/TopLevel.js
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e0ac7.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
index ab2051d..f538e0d 100644
--- a/base/flow/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
@@ -206,10 +206,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e2915.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e2915.json/default/TopLevel.js
index e774dfd..a8873fe 100644
--- a/base/flow/test/inputs/json/misc/e2915.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e2915.json/default/TopLevel.js
@@ -197,10 +197,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e2a58.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e2a58.json/default/TopLevel.js
index 6ab5788..0c07a35 100644
--- a/base/flow/test/inputs/json/misc/e2a58.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e2a58.json/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e324e.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e324e.json/default/TopLevel.js
index 6f4278c..339fd01 100644
--- a/base/flow/test/inputs/json/misc/e324e.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e324e.json/default/TopLevel.js
@@ -168,10 +168,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e53b5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e53b5.json/default/TopLevel.js
index 15ed332..bdda029 100644
--- a/base/flow/test/inputs/json/misc/e53b5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e53b5.json/default/TopLevel.js
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e64a0.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e64a0.json/default/TopLevel.js
index f9cab5b..6cc4baf 100644
--- a/base/flow/test/inputs/json/misc/e64a0.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e64a0.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e8a0b.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/e8b04.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/e8b04.json/default/TopLevel.js
index 1459701..3dcd97d 100644
--- a/base/flow/test/inputs/json/misc/e8b04.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/e8b04.json/default/TopLevel.js
@@ -366,10 +366,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/ed095.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/ed095.json/default/TopLevel.js
index e58461b..4b9df8d 100644
--- a/base/flow/test/inputs/json/misc/ed095.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/ed095.json/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f22f5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f22f5.json/default/TopLevel.js
index ba01b2c..0ec5458 100644
--- a/base/flow/test/inputs/json/misc/f22f5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f22f5.json/default/TopLevel.js
@@ -190,10 +190,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f3139.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f3139.json/default/TopLevel.js
index 6533855..1886171 100644
--- a/base/flow/test/inputs/json/misc/f3139.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f3139.json/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f3edf.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f3edf.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/f3edf.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f3edf.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f466a.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f466a.json/default/TopLevel.js
index 89794b9..c652537 100644
--- a/base/flow/test/inputs/json/misc/f466a.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f466a.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f6a65.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f6a65.json/default/TopLevel.js
index 3b08027..1c3b8d9 100644
--- a/base/flow/test/inputs/json/misc/f6a65.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f6a65.json/default/TopLevel.js
@@ -213,10 +213,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f74d5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f74d5.json/default/TopLevel.js
index f85b0f6..59db03b 100644
--- a/base/flow/test/inputs/json/misc/f74d5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f74d5.json/default/TopLevel.js
@@ -212,10 +212,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f82d9.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f82d9.json/default/TopLevel.js
index f0c5302..69da6d1 100644
--- a/base/flow/test/inputs/json/misc/f82d9.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f82d9.json/default/TopLevel.js
@@ -181,10 +181,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/f974d.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/f974d.json/default/TopLevel.js
index 639b694..e2e2a25 100644
--- a/base/flow/test/inputs/json/misc/f974d.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/f974d.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/faff5.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/faff5.json/default/TopLevel.js
index 2425915..2914689 100644
--- a/base/flow/test/inputs/json/misc/faff5.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/faff5.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/fcca3.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/fcca3.json/default/TopLevel.js
index b7ca334..b46bcf2 100644
--- a/base/flow/test/inputs/json/misc/fcca3.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/fcca3.json/default/TopLevel.js
@@ -309,10 +309,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/misc/fd329.json/default/TopLevel.js b/head/flow/test/inputs/json/misc/fd329.json/default/TopLevel.js
index 1eccbad..01b739f 100644
--- a/base/flow/test/inputs/json/misc/fd329.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/misc/fd329.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/blns-object.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/blns-object.json/default/TopLevel.js
index 4486ec1..ab14aee 100644
--- a/base/flow/test/inputs/json/priority/blns-object.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/blns-object.json/default/TopLevel.js
@@ -691,10 +691,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug2037.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug2037.json/default/TopLevel.js
index 6524a5e..b9c168a 100644
--- a/base/flow/test/inputs/json/priority/bug2037.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug2037.json/default/TopLevel.js
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug2521.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug2521.json/default/TopLevel.js
index 7d43d7b..87bfcc6 100644
--- a/base/flow/test/inputs/json/priority/bug2521.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug2521.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug2590.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug2590.json/default/TopLevel.js
index 31d6694..b65fa4d 100644
--- a/base/flow/test/inputs/json/priority/bug2590.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug2590.json/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug2663.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug2663.json/default/TopLevel.js
index b0f0629..f623a2c 100644
--- a/base/flow/test/inputs/json/priority/bug2663.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug2663.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug2793.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug2793.json/default/TopLevel.js
index 40f8379..03ba001 100644
--- a/base/flow/test/inputs/json/priority/bug2793.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug2793.json/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug427.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug427.json/default/TopLevel.js
index 87141a4..df7759e 100644
--- a/base/flow/test/inputs/json/priority/bug427.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug427.json/default/TopLevel.js
@@ -707,10 +707,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug790.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug790.json/default/TopLevel.js
index 61aae0c..4f5ec60 100644
--- a/base/flow/test/inputs/json/priority/bug790.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug790.json/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug855-short.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
index 9228688..b3748a3 100644
--- a/base/flow/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/bug863.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/bug863.json/default/TopLevel.js
index 2d45f63..e8a3016 100644
--- a/base/flow/test/inputs/json/priority/bug863.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/bug863.json/default/TopLevel.js
@@ -182,10 +182,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
index ce2c15a..bf77cf7 100644
--- a/base/flow/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations1.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/combinations1.json/default/TopLevel.js
index 892898a..876054b 100644
--- a/base/flow/test/inputs/json/priority/combinations1.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations1.json/default/TopLevel.js
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js b/head/flow/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
index 8bdf8ea..329a47e 100644
--- a/base/flow/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.js b/head/flow/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.js
index 892898a..876054b 100644
--- a/base/flow/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.js
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js b/head/flow/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
index 892898a..876054b 100644
--- a/base/flow/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/flow/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index 3e621e4..08861dc 100644
--- a/base/flow/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations2.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/combinations2.json/default/TopLevel.js
index 5199f24..f0b7b3b 100644
--- a/base/flow/test/inputs/json/priority/combinations2.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations2.json/default/TopLevel.js
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js b/head/flow/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
index c66bd33..e9bdd82 100644
--- a/base/flow/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.js b/head/flow/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.js
index 5199f24..f0b7b3b 100644
--- a/base/flow/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.js
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js b/head/flow/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
index 5199f24..f0b7b3b 100644
--- a/base/flow/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/flow/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index e565a44..4ff8d04 100644
--- a/base/flow/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations3.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/combinations3.json/default/TopLevel.js
index a84f903..62a366d 100644
--- a/base/flow/test/inputs/json/priority/combinations3.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations3.json/default/TopLevel.js
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js b/head/flow/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
index 0be9d36..0d1e5af 100644
--- a/base/flow/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.js b/head/flow/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.js
index a84f903..62a366d 100644
--- a/base/flow/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.js
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js b/head/flow/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
index a84f903..62a366d 100644
--- a/base/flow/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/flow/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index 1e61073..a9df069 100644
--- a/base/flow/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations4.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/combinations4.json/default/TopLevel.js
index fb135e5..33e7906 100644
--- a/base/flow/test/inputs/json/priority/combinations4.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations4.json/default/TopLevel.js
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js b/head/flow/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
index 4859842..d3b7932 100644
--- a/base/flow/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.js
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.js b/head/flow/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.js
index fb135e5..33e7906 100644
--- a/base/flow/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.js
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js b/head/flow/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
index fb135e5..33e7906 100644
--- a/base/flow/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.js
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/flow/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index ecd1d0c..5f3899a 100644
--- a/base/flow/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/combined-enum.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
index f1b13bb..f490ccc 100644
--- a/base/flow/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
index 57ff834..fd48328 100644
--- a/base/flow/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/empty-enum.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
index 3eb2ee8..1b2f53e 100644
--- a/base/flow/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/identifiers.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/identifiers.json/default/TopLevel.js
index 7b97fb6..0ddcadd 100644
--- a/base/flow/test/inputs/json/priority/identifiers.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/identifiers.json/default/TopLevel.js
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
index 3304381..a974f35 100644
--- a/base/flow/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
index 57ef2c0..ca2e55f 100644
--- a/base/flow/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/keywords.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/keywords.json/default/TopLevel.js
index 2029e3d..ac8c2f3 100644
--- a/base/flow/test/inputs/json/priority/keywords.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/keywords.json/default/TopLevel.js
@@ -1790,10 +1790,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
index f80ddb1..9b95351 100644
--- a/base/flow/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/list.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/list.json/default/TopLevel.js
index 46b9ee9..4e72a85 100644
--- a/base/flow/test/inputs/json/priority/list.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/list.json/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/name-style.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/name-style.json/default/TopLevel.js
index 26fd739..33b6c34 100644
--- a/base/flow/test/inputs/json/priority/name-style.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/name-style.json/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
index bc67efb..1d0f922 100644
--- a/base/flow/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
@@ -428,10 +428,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/nested-objects.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
index 70f13bb..458ad55 100644
--- a/base/flow/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/no-classes.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/no-classes.json/default/TopLevel.js
index a8973a2..b6a98eb 100644
--- a/base/flow/test/inputs/json/priority/no-classes.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/no-classes.json/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
index 5f71ad1..3f635af 100644
--- a/base/flow/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
@@ -236,10 +236,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/number-map.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/number-map.json/default/TopLevel.js
index cad18ef..e418f00 100644
--- a/base/flow/test/inputs/json/priority/number-map.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/number-map.json/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/omit-empty.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
index 0273271..8323484 100644
--- a/base/flow/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/optional-union.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/optional-union.json/default/TopLevel.js
index 643d117..ec0480b 100644
--- a/base/flow/test/inputs/json/priority/optional-union.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/optional-union.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
index 4e4662d..4efe9da 100644
--- a/base/flow/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/php-validation.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/php-validation.json/default/TopLevel.js
index 8b5565e..c47ae21 100644
--- a/base/flow/test/inputs/json/priority/php-validation.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/php-validation.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/recursive.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/recursive.json/default/TopLevel.js
index 3e0e277..a6a57c5 100644
--- a/base/flow/test/inputs/json/priority/recursive.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/recursive.json/default/TopLevel.js
@@ -215,10 +215,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
index 4a7b9cd..24b5a3a 100644
--- a/base/flow/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
index a3987a9..97cd8a4 100644
--- a/base/flow/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/unions.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/unions.json/default/TopLevel.js
index 283c106..df8c5ea 100644
--- a/base/flow/test/inputs/json/priority/unions.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/unions.json/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/url.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/url.json/default/TopLevel.js
index 4c1410e..7e73cc5 100644
--- a/base/flow/test/inputs/json/priority/url.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/url.json/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/priority/uuids.json/default/TopLevel.js b/head/flow/test/inputs/json/priority/uuids.json/default/TopLevel.js
index ff9d6dd..283ab20 100644
--- a/base/flow/test/inputs/json/priority/uuids.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/priority/uuids.json/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
index 639b694..e2e2a25 100644
--- a/base/flow/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
index 9f7c83e..8a75c45 100644
--- a/base/flow/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/getting-started.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/getting-started.json/default/TopLevel.js
index 0a0728d..7639133 100644
--- a/base/flow/test/inputs/json/samples/getting-started.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/getting-started.json/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/github-events.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/github-events.json/default/TopLevel.js
index f17022b..bc48377 100644
--- a/base/flow/test/inputs/json/samples/github-events.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/github-events.json/default/TopLevel.js
@@ -384,10 +384,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
index 536024f..7185086 100644
--- a/base/flow/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
@@ -128,10 +128,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/null-safe.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/null-safe.json/default/TopLevel.js
index aacaf95..2ba2204 100644
--- a/base/flow/test/inputs/json/samples/null-safe.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/null-safe.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
index d7e76ba..dbb7dba 100644
--- a/base/flow/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/pokedex.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/pokedex.json/default/TopLevel.js
index 74b9473..c11f2f9 100644
--- a/base/flow/test/inputs/json/samples/pokedex.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/pokedex.json/default/TopLevel.js
@@ -148,10 +148,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/reddit.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/reddit.json/default/TopLevel.js
index 2f58942..b2ae4c8 100644
--- a/base/flow/test/inputs/json/samples/reddit.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/reddit.json/default/TopLevel.js
@@ -237,10 +237,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/simple-object.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/simple-object.json/default/TopLevel.js
index 381cd53..09d01cc 100644
--- a/base/flow/test/inputs/json/samples/simple-object.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/simple-object.json/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/spotify-album.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
index 99106e9..14e0663 100644
--- a/base/flow/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
@@ -166,10 +166,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
index 1eccbad..01b739f 100644
--- a/base/flow/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/flow/test/inputs/json/samples/us-senators.json/default/TopLevel.js b/head/flow/test/inputs/json/samples/us-senators.json/default/TopLevel.js
index a439e02..d408f2e 100644
--- a/base/flow/test/inputs/json/samples/us-senators.json/default/TopLevel.js
+++ b/head/flow/test/inputs/json/samples/us-senators.json/default/TopLevel.js
@@ -201,10 +201,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github1.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github1.graphql/default/TopLevel.js
index e0890fb..2454706 100644
--- a/base/graphql-flow/test/inputs/graphql/github1.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github1.graphql/default/TopLevel.js
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github2.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github2.graphql/default/TopLevel.js
index 17c0615..eebb119 100644
--- a/base/graphql-flow/test/inputs/graphql/github2.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github2.graphql/default/TopLevel.js
@@ -119,10 +119,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github3.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github3.graphql/default/TopLevel.js
index 4e2fad5..6d11932 100644
--- a/base/graphql-flow/test/inputs/graphql/github3.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github3.graphql/default/TopLevel.js
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github4.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github4.graphql/default/TopLevel.js
index 6970141..14bb11d 100644
--- a/base/graphql-flow/test/inputs/graphql/github4.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github4.graphql/default/TopLevel.js
@@ -128,10 +128,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github5.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github5.graphql/default/TopLevel.js
index 6f93b2c..585311d 100644
--- a/base/graphql-flow/test/inputs/graphql/github5.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github5.graphql/default/TopLevel.js
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github6.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github6.graphql/default/TopLevel.js
index 82910a8..36c98e2 100644
--- a/base/graphql-flow/test/inputs/graphql/github6.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github6.graphql/default/TopLevel.js
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github7.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github7.graphql/default/TopLevel.js
index 144e435..fe596d8 100644
--- a/base/graphql-flow/test/inputs/graphql/github7.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github7.graphql/default/TopLevel.js
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github8.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github8.graphql/default/TopLevel.js
index 0a8d281..f9b2c78 100644
--- a/base/graphql-flow/test/inputs/graphql/github8.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github8.graphql/default/TopLevel.js
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-flow/test/inputs/graphql/github9.graphql/default/TopLevel.js b/head/graphql-flow/test/inputs/graphql/github9.graphql/default/TopLevel.js
index 4244d70..e4b19c7 100644
--- a/base/graphql-flow/test/inputs/graphql/github9.graphql/default/TopLevel.js
+++ b/head/graphql-flow/test/inputs/graphql/github9.graphql/default/TopLevel.js
@@ -128,10 +128,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github1.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github1.graphql/default/TopLevel.js
index a908803..4dbd987 100644
--- a/base/graphql-javascript/test/inputs/graphql/github1.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github1.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github2.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github2.graphql/default/TopLevel.js
index 327d7fd..a0d0d68 100644
--- a/base/graphql-javascript/test/inputs/graphql/github2.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github2.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github3.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github3.graphql/default/TopLevel.js
index 1f86530..3a2bcbd 100644
--- a/base/graphql-javascript/test/inputs/graphql/github3.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github3.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github4.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github4.graphql/default/TopLevel.js
index 9eae08b..e9ca788 100644
--- a/base/graphql-javascript/test/inputs/graphql/github4.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github4.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github5.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github5.graphql/default/TopLevel.js
index 420ace9..af11b11 100644
--- a/base/graphql-javascript/test/inputs/graphql/github5.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github5.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github6.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github6.graphql/default/TopLevel.js
index 15c6fba..01c9622 100644
--- a/base/graphql-javascript/test/inputs/graphql/github6.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github6.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github7.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github7.graphql/default/TopLevel.js
index 4249720..f16b880 100644
--- a/base/graphql-javascript/test/inputs/graphql/github7.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github7.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github8.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github8.graphql/default/TopLevel.js
index fd6d83e..f5cb283 100644
--- a/base/graphql-javascript/test/inputs/graphql/github8.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github8.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-javascript/test/inputs/graphql/github9.graphql/default/TopLevel.js b/head/graphql-javascript/test/inputs/graphql/github9.graphql/default/TopLevel.js
index f9c07fe..9fb7cd9 100644
--- a/base/graphql-javascript/test/inputs/graphql/github9.graphql/default/TopLevel.js
+++ b/head/graphql-javascript/test/inputs/graphql/github9.graphql/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github1.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github1.graphql/default/TopLevel.ts
index 578c5da..de60d92 100644
--- a/base/graphql-typescript/test/inputs/graphql/github1.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github1.graphql/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github2.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github2.graphql/default/TopLevel.ts
index c8dc669..b168793 100644
--- a/base/graphql-typescript/test/inputs/graphql/github2.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github2.graphql/default/TopLevel.ts
@@ -119,10 +119,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github3.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github3.graphql/default/TopLevel.ts
index 3a9ea88..a3581d6 100644
--- a/base/graphql-typescript/test/inputs/graphql/github3.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github3.graphql/default/TopLevel.ts
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github4.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github4.graphql/default/TopLevel.ts
index 2365eaf..ca193d3 100644
--- a/base/graphql-typescript/test/inputs/graphql/github4.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github4.graphql/default/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github5.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github5.graphql/default/TopLevel.ts
index acdc9b7..b726396 100644
--- a/base/graphql-typescript/test/inputs/graphql/github5.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github5.graphql/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github6.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github6.graphql/default/TopLevel.ts
index 020032a..47c5aa5 100644
--- a/base/graphql-typescript/test/inputs/graphql/github6.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github6.graphql/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github7.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github7.graphql/default/TopLevel.ts
index a0952a7..a3b6852 100644
--- a/base/graphql-typescript/test/inputs/graphql/github7.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github7.graphql/default/TopLevel.ts
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github8.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github8.graphql/default/TopLevel.ts
index 09a4037..59df82b 100644
--- a/base/graphql-typescript/test/inputs/graphql/github8.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github8.graphql/default/TopLevel.ts
@@ -119,10 +119,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/graphql-typescript/test/inputs/graphql/github9.graphql/default/TopLevel.ts b/head/graphql-typescript/test/inputs/graphql/github9.graphql/default/TopLevel.ts
index 9d653c2..fabfce4 100644
--- a/base/graphql-typescript/test/inputs/graphql/github9.graphql/default/TopLevel.ts
+++ b/head/graphql-typescript/test/inputs/graphql/github9.graphql/default/TopLevel.ts
@@ -122,10 +122,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/00c36.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/00c36.json/default/TopLevel.js
index 7bde2a3..a30e407 100644
--- a/base/javascript/test/inputs/json/misc/00c36.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/00c36.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/00ec5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/00ec5.json/default/TopLevel.js
index e58994e..dffc01e 100644
--- a/base/javascript/test/inputs/json/misc/00ec5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/00ec5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/010b1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/010b1.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/010b1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/010b1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/016af.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/016af.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/016af.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/016af.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/033b1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/033b1.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/033b1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/033b1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/050b0.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/050b0.json/default/TopLevel.js
index b031cf3..50b1487 100644
--- a/base/javascript/test/inputs/json/misc/050b0.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/050b0.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/06bee.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/06bee.json/default/TopLevel.js
index 4ed3634..15ddd6e 100644
--- a/base/javascript/test/inputs/json/misc/06bee.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/06bee.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/07540.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/07540.json/default/TopLevel.js
index ae8169d..1caf036 100644
--- a/base/javascript/test/inputs/json/misc/07540.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/07540.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0779f.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0779f.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/0779f.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0779f.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/07c75.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/07c75.json/default/TopLevel.js
index 8c10240..e773737 100644
--- a/base/javascript/test/inputs/json/misc/07c75.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/07c75.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/09f54.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/09f54.json/default/TopLevel.js
index d23e2d7..68bcd09 100644
--- a/base/javascript/test/inputs/json/misc/09f54.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/09f54.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0a358.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0a358.json/default/TopLevel.js
index cc5cbe0..7f09eea 100644
--- a/base/javascript/test/inputs/json/misc/0a358.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0a358.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0a91a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0a91a.json/default/TopLevel.js
index 874e0da..d6b2885 100644
--- a/base/javascript/test/inputs/json/misc/0a91a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0a91a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0b91a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0b91a.json/default/TopLevel.js
index 3b6f02b..837ba2c 100644
--- a/base/javascript/test/inputs/json/misc/0b91a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0b91a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0cffa.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0cffa.json/default/TopLevel.js
index 4921f33..c3f6a2b 100644
--- a/base/javascript/test/inputs/json/misc/0cffa.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0cffa.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0e0c2.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
index d74c94d..763bc2f 100644
--- a/base/javascript/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0e0c2.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/0fecf.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/0fecf.json/default/TopLevel.js
index c350529..1db6010 100644
--- a/base/javascript/test/inputs/json/misc/0fecf.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/0fecf.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/10be4.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/10be4.json/default/TopLevel.js
index 0f11bea..d4f8157 100644
--- a/base/javascript/test/inputs/json/misc/10be4.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/10be4.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/112b5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/112b5.json/default/TopLevel.js
index 988b2e3..fc0fbf9 100644
--- a/base/javascript/test/inputs/json/misc/112b5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/112b5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/127a1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/127a1.json/default/TopLevel.js
index 5029be5..8af6e14 100644
--- a/base/javascript/test/inputs/json/misc/127a1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/127a1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/13d8d.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/13d8d.json/default/TopLevel.js
index 1804248..e03b3be 100644
--- a/base/javascript/test/inputs/json/misc/13d8d.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/13d8d.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/14d38.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/14d38.json/default/TopLevel.js
index 5d15cc8..72b6323 100644
--- a/base/javascript/test/inputs/json/misc/14d38.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/14d38.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/167d6.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/167d6.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/167d6.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/167d6.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/16bc5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/16bc5.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/16bc5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/16bc5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/176f1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/176f1.json/default/TopLevel.js
index 351e84a..b494d04 100644
--- a/base/javascript/test/inputs/json/misc/176f1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/176f1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/1a7f5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/1a7f5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/1b28c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/1b28c.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/1b28c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/1b28c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/1b409.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/1b409.json/default/TopLevel.js
index 8192aa5..3b53185 100644
--- a/base/javascript/test/inputs/json/misc/1b409.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/1b409.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/2465e.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/2465e.json/default/TopLevel.js
index 6a33ed2..d7640aa 100644
--- a/base/javascript/test/inputs/json/misc/2465e.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/2465e.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/24f52.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/24f52.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/24f52.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/24f52.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/262f0.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/262f0.json/default/TopLevel.js
index fdbfeea..960fab6 100644
--- a/base/javascript/test/inputs/json/misc/262f0.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/262f0.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/26b49.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/26b49.json/default/TopLevel.js
index ca1a4e9..964a00f 100644
--- a/base/javascript/test/inputs/json/misc/26b49.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/26b49.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/26c9c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/26c9c.json/default/TopLevel.js
index 9ef5a1a..910593c 100644
--- a/base/javascript/test/inputs/json/misc/26c9c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/26c9c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/27332.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/27332.json/default/TopLevel.js
index 06e876f..1d26410 100644
--- a/base/javascript/test/inputs/json/misc/27332.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/27332.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/29f47.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/29f47.json/default/TopLevel.js
index a46f0c7..463704d 100644
--- a/base/javascript/test/inputs/json/misc/29f47.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/29f47.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/2d4e2.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
index dabaf9d..7016e5f 100644
--- a/base/javascript/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/2d4e2.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/2df80.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/2df80.json/default/TopLevel.js
index 5fc4099..aa18743 100644
--- a/base/javascript/test/inputs/json/misc/2df80.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/2df80.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/31189.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/31189.json/default/TopLevel.js
index d0130c4..7f1ea76 100644
--- a/base/javascript/test/inputs/json/misc/31189.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/31189.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/32431.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/32431.json/default/TopLevel.js
index 59f34aa..4a65c2e 100644
--- a/base/javascript/test/inputs/json/misc/32431.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/32431.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/32d5c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/32d5c.json/default/TopLevel.js
index 6f852a2..8b9589d 100644
--- a/base/javascript/test/inputs/json/misc/32d5c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/32d5c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/337ed.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/337ed.json/default/TopLevel.js
index 68c9784..5ffbfd5 100644
--- a/base/javascript/test/inputs/json/misc/337ed.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/337ed.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/33d2e.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/33d2e.json/default/TopLevel.js
index 6d3e524..bd97778 100644
--- a/base/javascript/test/inputs/json/misc/33d2e.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/33d2e.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/34702.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/34702.json/default/TopLevel.js
index f70dc0b..6a9df1c 100644
--- a/base/javascript/test/inputs/json/misc/34702.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/34702.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/3536b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/3536b.json/default/TopLevel.js
index 5fc3e3b..61d0df6 100644
--- a/base/javascript/test/inputs/json/misc/3536b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/3536b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/3659d.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/3659d.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/3659d.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/3659d.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/36d5d.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/36d5d.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/36d5d.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/36d5d.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/3a6b3.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/3a6b3.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/3e9a3.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
index 351e84a..b494d04 100644
--- a/base/javascript/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/3e9a3.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/3f1ce.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
index b6b4271..fc478aa 100644
--- a/base/javascript/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/3f1ce.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/421d4.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/421d4.json/default/TopLevel.js
index e80c8de..e1f2ca0 100644
--- a/base/javascript/test/inputs/json/misc/421d4.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/421d4.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/437e7.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/437e7.json/default/TopLevel.js
index 0c1fbce..242f300 100644
--- a/base/javascript/test/inputs/json/misc/437e7.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/437e7.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/43970.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/43970.json/default/TopLevel.js
index 4e4bfd1..3be4b27 100644
--- a/base/javascript/test/inputs/json/misc/43970.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/43970.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/43eaf.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/43eaf.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/43eaf.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/43eaf.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/458db.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/458db.json/default/TopLevel.js
index 0899bf9..883ca5f 100644
--- a/base/javascript/test/inputs/json/misc/458db.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/458db.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4961a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4961a.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/4961a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4961a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4a0d7.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4a0d7.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4a455.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4a455.json/default/TopLevel.js
index 405a535..599c6f0 100644
--- a/base/javascript/test/inputs/json/misc/4a455.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4a455.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4c547.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4c547.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/4c547.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4c547.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4d6fb.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
index e8d6e16..a2381b1 100644
--- a/base/javascript/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4d6fb.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/4e336.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/4e336.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/4e336.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/4e336.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/54147.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/54147.json/default/TopLevel.js
index 8f17e68..282de16 100644
--- a/base/javascript/test/inputs/json/misc/54147.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/54147.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/54d32.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/54d32.json/default/TopLevel.js
index d676c8d..8959de9 100644
--- a/base/javascript/test/inputs/json/misc/54d32.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/54d32.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/570ec.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/570ec.json/default/TopLevel.js
index 6ecbade..17742ff 100644
--- a/base/javascript/test/inputs/json/misc/570ec.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/570ec.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/5dd0d.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/5dd0d.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/5eae5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/5eae5.json/default/TopLevel.js
index f49ab65..d896bb4 100644
--- a/base/javascript/test/inputs/json/misc/5eae5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/5eae5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/5eb20.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/5eb20.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/5eb20.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/5eb20.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/5f3a1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/5f3a1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/5f7fe.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
index 69bd742..9df3290 100644
--- a/base/javascript/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/5f7fe.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/617e8.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/617e8.json/default/TopLevel.js
index c7de983..7af12b6 100644
--- a/base/javascript/test/inputs/json/misc/617e8.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/617e8.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/61b66.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/61b66.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/61b66.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/61b66.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6260a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6260a.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/6260a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6260a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/65dec.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/65dec.json/default/TopLevel.js
index 5747bf4..91e77b5 100644
--- a/base/javascript/test/inputs/json/misc/65dec.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/65dec.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/66121.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/66121.json/default/TopLevel.js
index 6b45478..345176a 100644
--- a/base/javascript/test/inputs/json/misc/66121.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/66121.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6617c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6617c.json/default/TopLevel.js
index c893589..f732a3f 100644
--- a/base/javascript/test/inputs/json/misc/6617c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6617c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/67c03.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/67c03.json/default/TopLevel.js
index 8cc7071..e9478a6 100644
--- a/base/javascript/test/inputs/json/misc/67c03.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/67c03.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/68c30.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/68c30.json/default/TopLevel.js
index 0e491bb..c6115f4 100644
--- a/base/javascript/test/inputs/json/misc/68c30.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/68c30.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6c155.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6c155.json/default/TopLevel.js
index 787e7f9..c49da9e 100644
--- a/base/javascript/test/inputs/json/misc/6c155.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6c155.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6de06.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6de06.json/default/TopLevel.js
index bcdf20d..e2db8ba 100644
--- a/base/javascript/test/inputs/json/misc/6de06.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6de06.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6dec6.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6dec6.json/default/TopLevel.js
index c65a864..4ad8dec 100644
--- a/base/javascript/test/inputs/json/misc/6dec6.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6dec6.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/6eb00.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/6eb00.json/default/TopLevel.js
index 7d4472c..f07129b 100644
--- a/base/javascript/test/inputs/json/misc/6eb00.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/6eb00.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/70c77.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/70c77.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/70c77.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/70c77.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/734ad.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/734ad.json/default/TopLevel.js
index 2dd7df3..d4c501f 100644
--- a/base/javascript/test/inputs/json/misc/734ad.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/734ad.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/75912.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/75912.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/75912.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/75912.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7681c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7681c.json/default/TopLevel.js
index c3f9405..728f957 100644
--- a/base/javascript/test/inputs/json/misc/7681c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7681c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/76ae1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/76ae1.json/default/TopLevel.js
index 177fff6..ac901fc 100644
--- a/base/javascript/test/inputs/json/misc/76ae1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/76ae1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/77392.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/77392.json/default/TopLevel.js
index ad4ed63..5c2c475 100644
--- a/base/javascript/test/inputs/json/misc/77392.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/77392.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7d397.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7d397.json/default/TopLevel.js
index 2ba2912..1f3a99f 100644
--- a/base/javascript/test/inputs/json/misc/7d397.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7d397.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7d722.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7d722.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/7d722.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7d722.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7df41.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7df41.json/default/TopLevel.js
index 4989112..fadb6bc 100644
--- a/base/javascript/test/inputs/json/misc/7df41.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7df41.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7dfa6.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7dfa6.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7eb30.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7eb30.json/default/TopLevel.js
index 5a22b1c..1fab219 100644
--- a/base/javascript/test/inputs/json/misc/7eb30.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7eb30.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7f568.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7f568.json/default/TopLevel.js
index 03269ce..8a0785d 100644
--- a/base/javascript/test/inputs/json/misc/7f568.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7f568.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/7fbfb.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
index 6bca24b..e1b3970 100644
--- a/base/javascript/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/7fbfb.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/80aff.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/80aff.json/default/TopLevel.js
index e7036f9..6a088d9 100644
--- a/base/javascript/test/inputs/json/misc/80aff.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/80aff.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/82509.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/82509.json/default/TopLevel.js
index 59da7ef..c13118a 100644
--- a/base/javascript/test/inputs/json/misc/82509.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/82509.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/8592b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/8592b.json/default/TopLevel.js
index fb2baf4..2f6abf9 100644
--- a/base/javascript/test/inputs/json/misc/8592b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/8592b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/88130.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/88130.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/88130.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/88130.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/8a62c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/8a62c.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/8a62c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/8a62c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/908db.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/908db.json/default/TopLevel.js
index 47fd602..188ffb3 100644
--- a/base/javascript/test/inputs/json/misc/908db.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/908db.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9617f.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9617f.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/9617f.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9617f.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/96f7c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/96f7c.json/default/TopLevel.js
index f4e553d..f2fe37c 100644
--- a/base/javascript/test/inputs/json/misc/96f7c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/96f7c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9847b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9847b.json/default/TopLevel.js
index b2fbeb7..007f394 100644
--- a/base/javascript/test/inputs/json/misc/9847b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9847b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9929c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9929c.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/9929c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9929c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/996bd.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/996bd.json/default/TopLevel.js
index a623356..b8297a4 100644
--- a/base/javascript/test/inputs/json/misc/996bd.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/996bd.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9a503.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9a503.json/default/TopLevel.js
index b655f68..a30b595 100644
--- a/base/javascript/test/inputs/json/misc/9a503.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9a503.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9ac3b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
index 94ebbc9..348756c 100644
--- a/base/javascript/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9ac3b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/9eed5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/9eed5.json/default/TopLevel.js
index 865f78d..f469fdf 100644
--- a/base/javascript/test/inputs/json/misc/9eed5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/9eed5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a0496.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a0496.json/default/TopLevel.js
index 4cbbdc6..195752c 100644
--- a/base/javascript/test/inputs/json/misc/a0496.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a0496.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a1eca.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a1eca.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/a1eca.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a1eca.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a3d8c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
index 47ca086..e3b11e7 100644
--- a/base/javascript/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a3d8c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a45b0.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a45b0.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/a45b0.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a45b0.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a71df.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a71df.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/a71df.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a71df.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/a9691.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/a9691.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/a9691.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/a9691.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ab0d1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ab0d1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/abb4b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/abb4b.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/abb4b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/abb4b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ac944.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ac944.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/ac944.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ac944.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ad8be.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ad8be.json/default/TopLevel.js
index 0f11bea..d4f8157 100644
--- a/base/javascript/test/inputs/json/misc/ad8be.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ad8be.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ae7f0.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
index 58067a6..80df0e7 100644
--- a/base/javascript/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ae7f0.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ae9ca.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
index a469f40..d355d66 100644
--- a/base/javascript/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ae9ca.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/af2d1.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/af2d1.json/default/TopLevel.js
index 61c13f0..93eb648 100644
--- a/base/javascript/test/inputs/json/misc/af2d1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/af2d1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/b4865.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/b4865.json/default/TopLevel.js
index c92e808..9b65bad 100644
--- a/base/javascript/test/inputs/json/misc/b4865.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/b4865.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/b6f2c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/b6f2c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/b6fe5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
index b614cc0..a3e3f00 100644
--- a/base/javascript/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/b6fe5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/b9f64.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/b9f64.json/default/TopLevel.js
index f1717c7..6eac757 100644
--- a/base/javascript/test/inputs/json/misc/b9f64.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/b9f64.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/bb1ec.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/bb1ec.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/be234.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/be234.json/default/TopLevel.js
index 23847ff..624c3a1 100644
--- a/base/javascript/test/inputs/json/misc/be234.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/be234.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/c0356.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/c0356.json/default/TopLevel.js
index 438a6fc..dc4608c 100644
--- a/base/javascript/test/inputs/json/misc/c0356.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/c0356.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/c0a3a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/c0a3a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/c3303.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/c3303.json/default/TopLevel.js
index 2c286be..6f92b3e 100644
--- a/base/javascript/test/inputs/json/misc/c3303.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/c3303.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/c6cfd.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
index ef2d6e9..4e3023e 100644
--- a/base/javascript/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/c6cfd.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/c8c7e.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
index ae17f28..f68a8b3 100644
--- a/base/javascript/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/c8c7e.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cb0cc.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
index c408c01..1aafa55 100644
--- a/base/javascript/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cb0cc.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cb81e.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cb81e.json/default/TopLevel.js
index 150dfff..3f3317e 100644
--- a/base/javascript/test/inputs/json/misc/cb81e.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cb81e.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ccd18.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ccd18.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/ccd18.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ccd18.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cd238.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cd238.json/default/TopLevel.js
index 7ed503d..24a9e52 100644
--- a/base/javascript/test/inputs/json/misc/cd238.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cd238.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cd463.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cd463.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/cd463.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cd463.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cda6c.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cda6c.json/default/TopLevel.js
index 97e4dd1..c13bbe6 100644
--- a/base/javascript/test/inputs/json/misc/cda6c.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cda6c.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cf0d8.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cf0d8.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/cfbce.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/cfbce.json/default/TopLevel.js
index b5bc8f9..ef1106d 100644
--- a/base/javascript/test/inputs/json/misc/cfbce.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/cfbce.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/d0908.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/d0908.json/default/TopLevel.js
index a8a2cb9..d4ce8bc 100644
--- a/base/javascript/test/inputs/json/misc/d0908.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/d0908.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/d23d5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/d23d5.json/default/TopLevel.js
index e5a1acd..d7064ca 100644
--- a/base/javascript/test/inputs/json/misc/d23d5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/d23d5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/dbfb3.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
index ab0231f..c94cbf6 100644
--- a/base/javascript/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/dbfb3.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/dc44f.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/dc44f.json/default/TopLevel.js
index 3290a2f..c3e0991 100644
--- a/base/javascript/test/inputs/json/misc/dc44f.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/dc44f.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/dd1ce.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
index 3290a2f..c3e0991 100644
--- a/base/javascript/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/dd1ce.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/dec3a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/dec3a.json/default/TopLevel.js
index a1a1ab7..2b54298 100644
--- a/base/javascript/test/inputs/json/misc/dec3a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/dec3a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/df957.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/df957.json/default/TopLevel.js
index acd1fb9..37accb2 100644
--- a/base/javascript/test/inputs/json/misc/df957.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/df957.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e0ac7.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
index 0985cf4..da5369b 100644
--- a/base/javascript/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e0ac7.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e2915.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e2915.json/default/TopLevel.js
index fd7fefa..760ffc1 100644
--- a/base/javascript/test/inputs/json/misc/e2915.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e2915.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e2a58.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e2a58.json/default/TopLevel.js
index 0859361..76b40f8 100644
--- a/base/javascript/test/inputs/json/misc/e2a58.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e2a58.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e324e.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e324e.json/default/TopLevel.js
index fa10af3..2605009 100644
--- a/base/javascript/test/inputs/json/misc/e324e.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e324e.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e53b5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e53b5.json/default/TopLevel.js
index ec39a74..1c8ea8d 100644
--- a/base/javascript/test/inputs/json/misc/e53b5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e53b5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e64a0.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e64a0.json/default/TopLevel.js
index 988b2e3..fc0fbf9 100644
--- a/base/javascript/test/inputs/json/misc/e64a0.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e64a0.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e8a0b.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e8a0b.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/e8b04.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/e8b04.json/default/TopLevel.js
index cfb13df..7185025 100644
--- a/base/javascript/test/inputs/json/misc/e8b04.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/e8b04.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/ed095.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/ed095.json/default/TopLevel.js
index 12ecaff..e6581c1 100644
--- a/base/javascript/test/inputs/json/misc/ed095.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/ed095.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f22f5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f22f5.json/default/TopLevel.js
index e7d55b9..b984dc6 100644
--- a/base/javascript/test/inputs/json/misc/f22f5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f22f5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f3139.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f3139.json/default/TopLevel.js
index b2fbeb7..007f394 100644
--- a/base/javascript/test/inputs/json/misc/f3139.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f3139.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f3edf.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f3edf.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/f3edf.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f3edf.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f466a.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f466a.json/default/TopLevel.js
index 5072650..c70f471 100644
--- a/base/javascript/test/inputs/json/misc/f466a.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f466a.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f6a65.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f6a65.json/default/TopLevel.js
index 2c60e6b..3fd2f14 100644
--- a/base/javascript/test/inputs/json/misc/f6a65.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f6a65.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f74d5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f74d5.json/default/TopLevel.js
index 580e744..2c61964 100644
--- a/base/javascript/test/inputs/json/misc/f74d5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f74d5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f82d9.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f82d9.json/default/TopLevel.js
index 2df6837..333733e 100644
--- a/base/javascript/test/inputs/json/misc/f82d9.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f82d9.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/f974d.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/f974d.json/default/TopLevel.js
index 22fb238..b0b6eae 100644
--- a/base/javascript/test/inputs/json/misc/f974d.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/f974d.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/faff5.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/faff5.json/default/TopLevel.js
index 984006a..18f26ad 100644
--- a/base/javascript/test/inputs/json/misc/faff5.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/faff5.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/fcca3.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/fcca3.json/default/TopLevel.js
index e17f74c..65de480 100644
--- a/base/javascript/test/inputs/json/misc/fcca3.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/fcca3.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/misc/fd329.json/default/TopLevel.js b/head/javascript/test/inputs/json/misc/fd329.json/default/TopLevel.js
index d23e2d7..68bcd09 100644
--- a/base/javascript/test/inputs/json/misc/fd329.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/misc/fd329.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/blns-object.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/blns-object.json/default/TopLevel.js
index 02c4dcf..0f94939 100644
--- a/base/javascript/test/inputs/json/priority/blns-object.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/blns-object.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug2037.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug2037.json/default/TopLevel.js
index 4db6c3c..8ee286e 100644
--- a/base/javascript/test/inputs/json/priority/bug2037.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug2037.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug2521.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug2521.json/default/TopLevel.js
index 439166c..58f90a5 100644
--- a/base/javascript/test/inputs/json/priority/bug2521.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug2521.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug2590.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug2590.json/default/TopLevel.js
index 6c8f4c3..c5001be 100644
--- a/base/javascript/test/inputs/json/priority/bug2590.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug2590.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug2663.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug2663.json/default/TopLevel.js
index c6916a2..e929142 100644
--- a/base/javascript/test/inputs/json/priority/bug2663.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug2663.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug2793.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug2793.json/default/TopLevel.js
index 4b2fe59..ba1bfec 100644
--- a/base/javascript/test/inputs/json/priority/bug2793.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug2793.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug427.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug427.json/default/TopLevel.js
index 0e23edd..0504dc1 100644
--- a/base/javascript/test/inputs/json/priority/bug427.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug427.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug790.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug790.json/default/TopLevel.js
index 076984a..00cd0a6 100644
--- a/base/javascript/test/inputs/json/priority/bug790.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug790.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug855-short.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
index bd2794c..eb8c544 100644
--- a/base/javascript/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug855-short.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/bug863.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/bug863.json/default/TopLevel.js
index cabd493..053d5dc 100644
--- a/base/javascript/test/inputs/json/priority/bug863.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/bug863.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
index c113e96..2181128 100644
--- a/base/javascript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations1.json/converters-top-level--67aa452ed509/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations1.json/converters-top-level--67aa452ed509/TopLevel.js
index c6b3420..e9429c7 100644
--- a/base/javascript/test/inputs/json/priority/combinations1.json/converters-top-level--67aa452ed509/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations1.json/converters-top-level--67aa452ed509/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations1.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations1.json/default/TopLevel.js
index c6b3420..e9429c7 100644
--- a/base/javascript/test/inputs/json/priority/combinations1.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations1.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.js
index e220990..331fb59 100644
--- a/base/javascript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index 957f00f..7a1151e 100644
--- a/base/javascript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations2.json/converters-top-level--67aa452ed509/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations2.json/converters-top-level--67aa452ed509/TopLevel.js
index 8de8df6..908baae 100644
--- a/base/javascript/test/inputs/json/priority/combinations2.json/converters-top-level--67aa452ed509/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations2.json/converters-top-level--67aa452ed509/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations2.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations2.json/default/TopLevel.js
index 8de8df6..908baae 100644
--- a/base/javascript/test/inputs/json/priority/combinations2.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations2.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.js
index 2362827..24a7b74 100644
--- a/base/javascript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index fbb3c93..46063b2 100644
--- a/base/javascript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations3.json/converters-top-level--67aa452ed509/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations3.json/converters-top-level--67aa452ed509/TopLevel.js
index 7bdc1a8..b1ead9e 100644
--- a/base/javascript/test/inputs/json/priority/combinations3.json/converters-top-level--67aa452ed509/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations3.json/converters-top-level--67aa452ed509/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations3.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations3.json/default/TopLevel.js
index 7bdc1a8..b1ead9e 100644
--- a/base/javascript/test/inputs/json/priority/combinations3.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations3.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.js
index 0fc1b77..32dc9df 100644
--- a/base/javascript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index d88ee80..e2b525a 100644
--- a/base/javascript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations4.json/converters-top-level--67aa452ed509/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations4.json/converters-top-level--67aa452ed509/TopLevel.js
index 9098e52..dbc39f0 100644
--- a/base/javascript/test/inputs/json/priority/combinations4.json/converters-top-level--67aa452ed509/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations4.json/converters-top-level--67aa452ed509/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations4.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations4.json/default/TopLevel.js
index 9098e52..dbc39f0 100644
--- a/base/javascript/test/inputs/json/priority/combinations4.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations4.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.js
index 84b4eb4..448ce77 100644
--- a/base/javascript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js b/head/javascript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
index 60a61ff..7a96406 100644
--- a/base/javascript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/combined-enum.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
index 7db1140..65896a1 100644
--- a/base/javascript/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/combined-enum.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
index 25bdd46..2bda39b 100644
--- a/base/javascript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/empty-enum.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
index 2805dbb..6460a9a 100644
--- a/base/javascript/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/empty-enum.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/identifiers.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/identifiers.json/default/TopLevel.js
index 24aedef..dd0c1e3 100644
--- a/base/javascript/test/inputs/json/priority/identifiers.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/identifiers.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
index 601b357..1ddb54f 100644
--- a/base/javascript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
index 9515706..3fad4a2 100644
--- a/base/javascript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/keywords.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/keywords.json/default/TopLevel.js
index 3210b84..c9c228e 100644
--- a/base/javascript/test/inputs/json/priority/keywords.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/keywords.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
index afd8b5b..dfa68b4 100644
--- a/base/javascript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/list.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/list.json/default/TopLevel.js
index 279b16f..3600f23 100644
--- a/base/javascript/test/inputs/json/priority/list.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/list.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/name-style.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/name-style.json/default/TopLevel.js
index 1f13def..0a92d58 100644
--- a/base/javascript/test/inputs/json/priority/name-style.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/name-style.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
index 6a9855b..15b9871 100644
--- a/base/javascript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/nested-objects.json/converters-all-objects--3a443babd1cb/TopLevel.js b/head/javascript/test/inputs/json/priority/nested-objects.json/converters-all-objects--3a443babd1cb/TopLevel.js
index d14ecfb..c839f82 100644
--- a/base/javascript/test/inputs/json/priority/nested-objects.json/converters-all-objects--3a443babd1cb/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/nested-objects.json/converters-all-objects--3a443babd1cb/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/nested-objects.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
index d14ecfb..c839f82 100644
--- a/base/javascript/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/nested-objects.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/no-classes.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/no-classes.json/default/TopLevel.js
index 38e3295..09219fd 100644
--- a/base/javascript/test/inputs/json/priority/no-classes.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/no-classes.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
index c52af80..0399dd2 100644
--- a/base/javascript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/number-map.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/number-map.json/default/TopLevel.js
index f67e389..309cc42 100644
--- a/base/javascript/test/inputs/json/priority/number-map.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/number-map.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/omit-empty.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
index 43380a8..8737333 100644
--- a/base/javascript/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/omit-empty.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/optional-union.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/optional-union.json/default/TopLevel.js
index 2287ca4..c0bf086 100644
--- a/base/javascript/test/inputs/json/priority/optional-union.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/optional-union.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
index 555bab5..5a52700 100644
--- a/base/javascript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/php-validation.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/php-validation.json/default/TopLevel.js
index 6cdb09a..1bfe5b8 100644
--- a/base/javascript/test/inputs/json/priority/php-validation.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/php-validation.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/recursive.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/recursive.json/default/TopLevel.js
index ebdf80c..75f8c73 100644
--- a/base/javascript/test/inputs/json/priority/recursive.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/recursive.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
index 1ecd528..b86fa94 100644
--- a/base/javascript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
index f541287..1d9e8fb 100644
--- a/base/javascript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/unions.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/unions.json/default/TopLevel.js
index 5686cad..20de1f2 100644
--- a/base/javascript/test/inputs/json/priority/unions.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/unions.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/url.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/url.json/default/TopLevel.js
index eddd54c..119f008 100644
--- a/base/javascript/test/inputs/json/priority/url.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/url.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/priority/uuids.json/default/TopLevel.js b/head/javascript/test/inputs/json/priority/uuids.json/default/TopLevel.js
index a8baed6..82d79ba 100644
--- a/base/javascript/test/inputs/json/priority/uuids.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/priority/uuids.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
index 22fb238..b0b6eae 100644
--- a/base/javascript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
index 744997a..e5f915b 100644
--- a/base/javascript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/getting-started.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/getting-started.json/default/TopLevel.js
index 6286f9a..4ac833e 100644
--- a/base/javascript/test/inputs/json/samples/getting-started.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/getting-started.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/github-events.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/github-events.json/default/TopLevel.js
index 8cdad8e..3d0fbee 100644
--- a/base/javascript/test/inputs/json/samples/github-events.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/github-events.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
index 482996b..31023ec 100644
--- a/base/javascript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/null-safe.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/null-safe.json/default/TopLevel.js
index 561f080..9078a49 100644
--- a/base/javascript/test/inputs/json/samples/null-safe.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/null-safe.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
index a887bec..00c156c 100644
--- a/base/javascript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/pokedex.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/pokedex.json/default/TopLevel.js
index 51d9840..3093470 100644
--- a/base/javascript/test/inputs/json/samples/pokedex.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/pokedex.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/reddit.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/reddit.json/default/TopLevel.js
index 1ebb38a..005cf98 100644
--- a/base/javascript/test/inputs/json/samples/reddit.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/reddit.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/simple-object.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/simple-object.json/default/TopLevel.js
index 6be8558..f1316d9 100644
--- a/base/javascript/test/inputs/json/samples/simple-object.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/simple-object.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/spotify-album.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
index 86817b6..3927c9b 100644
--- a/base/javascript/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/spotify-album.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
index d23e2d7..68bcd09 100644
--- a/base/javascript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/javascript/test/inputs/json/samples/us-senators.json/default/TopLevel.js b/head/javascript/test/inputs/json/samples/us-senators.json/default/TopLevel.js
index dc3a543..e0ac500 100644
--- a/base/javascript/test/inputs/json/samples/us-senators.json/default/TopLevel.js
+++ b/head/javascript/test/inputs/json/samples/us-senators.json/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
index c9e211f..8e1010e 100644
--- a/base/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/date-time.schema/default/TopLevel.dart
@@ -25,8 +25,8 @@ class TopLevel {
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
         complexUnionArray: List<dynamic>.from(json["complex-union-array"].map((x) => x)),
-        date: DateTime.parse(json["date"]),
-        dateTime: DateTime.parse(json["date-time"]),
+        date: _parseDateTime(json["date"]),
+        dateTime: _parseDateTime(json["date-time"]),
         time: json["time"],
         unionArray: List<String>.from(json["union-array"].map((x) => x)),
     );
@@ -61,3 +61,10 @@ class EnumValues<T> {
             return reverseMap;
     }
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
index 57bb775..ea7562a 100644
--- a/base/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/optional-date-time.schema/default/TopLevel.dart
@@ -26,11 +26,11 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
-        optionalDate: json["optional-date"] == null ? null : DateTime.parse(json["optional-date"]),
-        optionalDateTime: json["optional-date-time"] == null ? null : DateTime.parse(json["optional-date-time"]),
+        optionalDate: json["optional-date"] == null ? null : _parseDateTime(json["optional-date"]),
+        optionalDateTime: json["optional-date-time"] == null ? null : _parseDateTime(json["optional-date-time"]),
         optionalTime: json["optional-time"],
-        requiredDate: DateTime.parse(json["required-date"]),
-        requiredDateTime: DateTime.parse(json["required-date-time"]),
+        requiredDate: _parseDateTime(json["required-date"]),
+        requiredDateTime: _parseDateTime(json["required-date-time"]),
         requiredTime: json["required-time"],
     );
 
@@ -43,3 +43,10 @@ class TopLevel {
         "required-time": requiredTime,
     };
 }
+
+DateTime _parseDateTime(String value) {
+    final normalized = value.toUpperCase(), parts = value.substring(0, 10).split('-').map(int.parse).toList();
+    final date = DateTime.utc(parts[0], parts[1], parts[2]).toIso8601String().substring(0, 10);
+    if (date != normalized.substring(0, 10)) throw FormatException('Invalid date-time', value);
+    return DateTime.parse(normalized);
+}
diff --git a/base/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
index 782c410..ed0a091 100644
--- a/base/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/accessors.schema/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
index 30facbe..d743815 100644
--- a/base/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/any.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/any.schema/default/TopLevel.js
index 9b41bf2..3caa726 100644
--- a/base/schema-flow/test/inputs/schema/any.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/any.schema/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
index de3bb1e..70047b7 100644
--- a/base/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/bool-string.schema/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
index 0ab5f8f..6d78896 100644
--- a/base/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/camelCase.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/camelCase.schema/default/TopLevel.js
index e050014..49f21e3 100644
--- a/base/schema-flow/test/inputs/schema/camelCase.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/camelCase.schema/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/class-map-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/class-map-union.schema/default/TopLevel.js
index f8747ce..6e0c142 100644
--- a/base/schema-flow/test/inputs/schema/class-map-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/class-map-union.schema/default/TopLevel.js
@@ -113,10 +113,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/class-with-additional.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
index 319b5d0..08a932c 100644
--- a/base/schema-flow/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
index 03492d1..64c81ff 100644
--- a/base/schema-flow/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
@@ -111,10 +111,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
index 7267743..0c9f1d8 100644
--- a/base/schema-flow/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
@@ -117,10 +117,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
index 3883ea0..7d0263c 100644
--- a/base/schema-flow/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
index a6c6ee5..c2f99fa 100644
--- a/base/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/comment-injection.schema/default/TopLevel.js
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
index bfdefce..e5760be 100644
--- a/base/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/const-non-string.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/constructor.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/constructor.schema/default/TopLevel.js
index 461857e..7fab754 100644
--- a/base/schema-flow/test/inputs/schema/constructor.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/constructor.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/cut-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/cut-enum.schema/default/TopLevel.js
index fd3804b..8bcfba8 100644
--- a/base/schema-flow/test/inputs/schema/cut-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/cut-enum.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
index 159b882..4b5641b 100644
--- a/base/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
index 5679fa7..b997df9 100644
--- a/base/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/date-time.schema/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/default-value.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/default-value.schema/default/TopLevel.js
index 9529bb0..27641af 100644
--- a/base/schema-flow/test/inputs/schema/default-value.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/default-value.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
index 460c470..99f0151 100644
--- a/base/schema-flow/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
index 8a80a17..9437fdf 100644
--- a/base/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/description.schema/default/TopLevel.js
@@ -135,10 +135,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
index 953338d..36fabbe 100644
--- a/base/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/direct-union.schema/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/empty-object.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/empty-object.schema/default/TopLevel.js
index 3b57852..927b959 100644
--- a/base/schema-flow/test/inputs/schema/empty-object.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/empty-object.schema/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/enum-large.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/enum-large.schema/default/TopLevel.js
index da2bc16..95fe325 100644
--- a/base/schema-flow/test/inputs/schema/enum-large.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/enum-large.schema/default/TopLevel.js
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/enum-with-null.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
index 6d8d098..977676c 100644
--- a/base/schema-flow/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/enum-with-values.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
index b984eb2..2a784b2 100644
--- a/base/schema-flow/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
index 6fe5b6c..dd8cbee 100644
--- a/base/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/enum.schema/default/TopLevel.js
@@ -118,10 +118,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
index 022ded2..659e15a 100644
--- a/base/schema-flow/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
index 35ad8a1..36e0de3 100644
--- a/base/schema-flow/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
index 4142df5..b4ebe7e 100644
--- a/base/schema-flow/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/id-no-address.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/id-no-address.schema/default/TopLevel.js
index 94dd602..02b448a 100644
--- a/base/schema-flow/test/inputs/schema/id-no-address.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/id-no-address.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/id-root.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/id-root.schema/default/TopLevel.js
index 0da7b3c..06fdc40 100644
--- a/base/schema-flow/test/inputs/schema/id-root.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/id-root.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
index 282e724..b66fd0e 100644
--- a/base/schema-flow/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
index 3e5b1af..dfa52a2 100644
--- a/base/schema-flow/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
index 7c09067..eae2989 100644
--- a/base/schema-flow/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
index 028af63..1e6199d 100644
--- a/base/schema-flow/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/integer-before-number.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
index c7d038a..cafdd42 100644
--- a/base/schema-flow/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/integer-float-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
index c434c99..4d21bdb 100644
--- a/base/schema-flow/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
index ef28a5e..f1fd0c1 100644
--- a/base/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-string.schema/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
index 51b83f3..9752ccd 100644
--- a/base/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/integer-type.schema/default/TopLevel.js
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/intersection-nested.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
index 58885fc..2a6f912 100644
--- a/base/schema-flow/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/intersection.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/intersection.schema/default/TopLevel.js
index 7ff9370..5bd4bca 100644
--- a/base/schema-flow/test/inputs/schema/intersection.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/intersection.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
index 57ef2c0..ca2e55f 100644
--- a/base/schema-flow/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/keyword-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
index bbfdfd0..128a01d 100644
--- a/base/schema-flow/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
@@ -432,10 +432,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/keyword-unions.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
index 0ba6f6c..4853789 100644
--- a/base/schema-flow/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
@@ -2089,10 +2089,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
index 87eb58e..543b31b 100644
--- a/base/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/light.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/list.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/list.schema/default/TopLevel.js
index 17c0e10..44f1946 100644
--- a/base/schema-flow/test/inputs/schema/list.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/list.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
index 669266c..5457085 100644
--- a/base/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/min-max-items.schema/default/TopLevel.js
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
index 60be51d..b9416df 100644
--- a/base/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
index d58225c..d11463f 100644
--- a/base/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmax.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
index bd4537b..e14929d 100644
--- a/base/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
index 61a8238..90af2e3 100644
--- a/base/schema-flow/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
index cbf3645..de0b803 100644
--- a/base/schema-flow/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
index 11caa97..54107c2 100644
--- a/base/schema-flow/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
index 63ee252..e99afaf 100644
--- a/base/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
index b682aea..fb3ad05 100644
--- a/base/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/object-type-required.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/object-type-required.schema/default/TopLevel.js
index 695aabc..6c80cc7 100644
--- a/base/schema-flow/test/inputs/schema/object-type-required.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/object-type-required.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
index e3ef54d..2086565 100644
--- a/base/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-any.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
index c6e94b4..8b3e613 100644
--- a/base/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
index 3afc5fb..e38562c 100644
--- a/base/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
index 5c5a63e..227e26d 100644
--- a/base/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-enum.schema/default/TopLevel.js
index 5708ba1..a508c4d 100644
--- a/base/schema-flow/test/inputs/schema/optional-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-enum.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/optional-property.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/optional-property.schema/default/TopLevel.js
index 9e8c173..55b7275 100644
--- a/base/schema-flow/test/inputs/schema/optional-property.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/optional-property.schema/default/TopLevel.js
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/pattern.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/pattern.schema/default/TopLevel.js
index 7259f33..742042d 100644
--- a/base/schema-flow/test/inputs/schema/pattern.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/pattern.schema/default/TopLevel.js
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/postman-collection.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/postman-collection.schema/default/TopLevel.js
index 8139ed9..e9935fd 100644
--- a/base/schema-flow/test/inputs/schema/postman-collection.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/postman-collection.schema/default/TopLevel.js
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
index de153a7..c913dfa 100644
--- a/base/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/prefix-items.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
index b1766ee..de79406 100644
--- a/base/schema-flow/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/ref-id-files.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
index fd3804b..8bcfba8 100644
--- a/base/schema-flow/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/ref-remote.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/ref-remote.schema/default/TopLevel.js
index 17c0e10..44f1946 100644
--- a/base/schema-flow/test/inputs/schema/ref-remote.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/ref-remote.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
index bfa4e9f..deb218a 100644
--- a/base/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
@@ -199,10 +199,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/required-draft3.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/required-draft3.schema/default/TopLevel.js
index d35b9e7..9215e15 100644
--- a/base/schema-flow/test/inputs/schema/required-draft3.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/required-draft3.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/required-non-properties.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
index 99c86ad..e16631b 100644
--- a/base/schema-flow/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/required.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/required.schema/default/TopLevel.js
index d35b9e7..9215e15 100644
--- a/base/schema-flow/test/inputs/schema/required.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/required.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
index 9868a9b..5e77234 100644
--- a/base/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/schema-constraints.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
index 2f38303..0271d25 100644
--- a/base/schema-flow/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/simple-ref.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/simple-ref.schema/default/TopLevel.js
index 17c0e10..44f1946 100644
--- a/base/schema-flow/test/inputs/schema/simple-ref.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/simple-ref.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/strict-optional.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/strict-optional.schema/default/TopLevel.js
index f385a6f..b76d70d 100644
--- a/base/schema-flow/test/inputs/schema/strict-optional.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/strict-optional.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/top-level-array.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/top-level-array.schema/default/TopLevel.js
index 6db6cca..a9fd035 100644
--- a/base/schema-flow/test/inputs/schema/top-level-array.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/top-level-array.schema/default/TopLevel.js
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/top-level-enum.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
index e182a8b..5785da7 100644
--- a/base/schema-flow/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
index c8d59da..dbd707d 100644
--- a/base/schema-flow/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
index bd2bada..c3feca8 100644
--- a/base/schema-flow/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/tuple.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/tuple.schema/default/TopLevel.js
index 0a3be23..3b046d0 100644
--- a/base/schema-flow/test/inputs/schema/tuple.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/tuple.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
index 8c9f7fb..93fa6de 100644
--- a/base/schema-flow/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
@@ -115,10 +115,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
index ab0a898..4e6b0c8 100644
--- a/base/schema-flow/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/union-int-double.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/union-int-double.schema/default/TopLevel.js
index 0e237ee..4a2de7e 100644
--- a/base/schema-flow/test/inputs/schema/union-int-double.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/union-int-double.schema/default/TopLevel.js
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/union-list.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/union-list.schema/default/TopLevel.js
index 2b31d51..0035e27 100644
--- a/base/schema-flow/test/inputs/schema/union-list.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/union-list.schema/default/TopLevel.js
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/union.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/union.schema/default/TopLevel.js
index af3f6dc..e878132 100644
--- a/base/schema-flow/test/inputs/schema/union.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/union.schema/default/TopLevel.js
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
index b30ae68..37d0ba5 100644
--- a/base/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/uuid.schema/default/TopLevel.js
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js b/head/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
index e870aef..04de345 100644
--- a/base/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
+++ b/head/schema-flow/test/inputs/schema/vega-lite.schema/default/TopLevel.js
@@ -6188,10 +6188,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
index eb93e60..69c04ff 100644
--- a/base/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/accessors.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
index 01d1011..53a5bbd 100644
--- a/base/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/any.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/any.schema/default/TopLevel.js
index 93439e6..a8151b3 100644
--- a/base/schema-javascript/test/inputs/schema/any.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/any.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
index d5a8ec8..79de87c 100644
--- a/base/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/bool-string.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
index 596d20f..21d8228 100644
--- a/base/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/camelCase.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/camelCase.schema/default/TopLevel.js
index 4b3914b..a7583ae 100644
--- a/base/schema-javascript/test/inputs/schema/camelCase.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/camelCase.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/class-map-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/class-map-union.schema/default/TopLevel.js
index 0c7c22f..e6d9f54 100644
--- a/base/schema-javascript/test/inputs/schema/class-map-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/class-map-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/class-with-additional.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
index 13e6554..ff332ec 100644
--- a/base/schema-javascript/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/class-with-additional.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
index df87d90..9f0d519 100644
--- a/base/schema-javascript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
index df87d90..9f0d519 100644
--- a/base/schema-javascript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
index d5f1013..9e2fe83 100644
--- a/base/schema-javascript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
index fc9edb9..6fe2498 100644
--- a/base/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/comment-injection.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
index 633025b..b9fc19a 100644
--- a/base/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/const-non-string.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/constructor.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/constructor.schema/default/TopLevel.js
index 38db74a..46a779a 100644
--- a/base/schema-javascript/test/inputs/schema/constructor.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/constructor.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/cut-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/cut-enum.schema/default/TopLevel.js
index 8f33714..1fdaef4 100644
--- a/base/schema-javascript/test/inputs/schema/cut-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/cut-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
index 02a84a3..2c2b9b3 100644
--- a/base/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
index e3c81ff..e7dd092 100644
--- a/base/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/date-time.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/default-value.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/default-value.schema/default/TopLevel.js
index fed7bb6..f9047aa 100644
--- a/base/schema-javascript/test/inputs/schema/default-value.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/default-value.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
index a60a61d..c4a79d8 100644
--- a/base/schema-javascript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
index 9beaaae..d7f837e 100644
--- a/base/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/description.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
index bd3ee9a..cff8a14 100644
--- a/base/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/direct-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/empty-object.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/empty-object.schema/default/TopLevel.js
index 57bbea2..5e458b7 100644
--- a/base/schema-javascript/test/inputs/schema/empty-object.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/empty-object.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/enum-large.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/enum-large.schema/default/TopLevel.js
index a0aed2b..f1d35f6 100644
--- a/base/schema-javascript/test/inputs/schema/enum-large.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/enum-large.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/enum-with-null.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
index 492c8d8..83dd7a1 100644
--- a/base/schema-javascript/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/enum-with-null.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/enum-with-values.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
index c7ec8cd..033ef77 100644
--- a/base/schema-javascript/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/enum-with-values.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
index 2242ba6..55c852e 100644
--- a/base/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
index 2f0bc8f..8d392ab 100644
--- a/base/schema-javascript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
index e5d80d9..40070ec 100644
--- a/base/schema-javascript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
index 074fee8..43b753e 100644
--- a/base/schema-javascript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/id-no-address.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/id-no-address.schema/default/TopLevel.js
index 8ceabb8..df9f1b9 100644
--- a/base/schema-javascript/test/inputs/schema/id-no-address.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/id-no-address.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/id-root.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/id-root.schema/default/TopLevel.js
index c70a4f7..11e398f 100644
--- a/base/schema-javascript/test/inputs/schema/id-root.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/id-root.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
index b293c44..1a21e65 100644
--- a/base/schema-javascript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
index afc3a12..0471da9 100644
--- a/base/schema-javascript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
index 7b6d864..a8b86d0 100644
--- a/base/schema-javascript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
index 77234bf..1cb7ea3 100644
--- a/base/schema-javascript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/integer-before-number.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
index 0be94db..4444829 100644
--- a/base/schema-javascript/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-before-number.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/integer-float-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
index dbc9c1a..d9fcf81 100644
--- a/base/schema-javascript/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-float-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
index 0464053..851aba0 100644
--- a/base/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-string.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
index b132e1a..13f98e6 100644
--- a/base/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/integer-type.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/intersection-nested.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
index 42c8812..d3c137e 100644
--- a/base/schema-javascript/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/intersection-nested.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/intersection.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/intersection.schema/default/TopLevel.js
index a7c7c5e..0b06cd8 100644
--- a/base/schema-javascript/test/inputs/schema/intersection.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/intersection.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
index 9515706..3fad4a2 100644
--- a/base/schema-javascript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/keyword-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
index 72b3ce1..0e388a2 100644
--- a/base/schema-javascript/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/keyword-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/keyword-unions.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
index 39cbbd5..3534ef1 100644
--- a/base/schema-javascript/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/keyword-unions.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
index 728625c..cf3c010 100644
--- a/base/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/light.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/list.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/list.schema/default/TopLevel.js
index 2374532..7cfdfa2 100644
--- a/base/schema-javascript/test/inputs/schema/list.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/list.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
index b484c0d..8d5f8bc 100644
--- a/base/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/min-max-items.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
index d29d8cb..2eee85d 100644
--- a/base/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmax-integer.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
index ef1dd4c..d69739f 100644
--- a/base/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmax.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
index 7fbee31..ac4ad44 100644
--- a/base/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/minmaxlength.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
index c378dc9..fd7aa19 100644
--- a/base/schema-javascript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
index ac03b2a..21e0ade 100644
--- a/base/schema-javascript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
index 5fcdf07..9bf729a 100644
--- a/base/schema-javascript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
index b3dee50..3fdfd7d 100644
--- a/base/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
index ad02812..0c42edc 100644
--- a/base/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/object-type-required.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/object-type-required.schema/default/TopLevel.js
index 4b78556..58ae2ee 100644
--- a/base/schema-javascript/test/inputs/schema/object-type-required.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/object-type-required.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
index cb9365b..0a148a7 100644
--- a/base/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-any.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
index d9d25b7..c5a6a09 100644
--- a/base/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
index dfcbd91..dd19151 100644
--- a/base/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-constraints.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
index 464092f..7660661 100644
--- a/base/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-date-time.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-enum.schema/default/TopLevel.js
index b06093c..99c4552 100644
--- a/base/schema-javascript/test/inputs/schema/optional-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/optional-property.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/optional-property.schema/default/TopLevel.js
index 60e3446..e2c50ce 100644
--- a/base/schema-javascript/test/inputs/schema/optional-property.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/optional-property.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/pattern.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/pattern.schema/default/TopLevel.js
index 4b96753..e6622c5 100644
--- a/base/schema-javascript/test/inputs/schema/pattern.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/pattern.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/postman-collection.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/postman-collection.schema/default/TopLevel.js
index 87d210f..d89cd99 100644
--- a/base/schema-javascript/test/inputs/schema/postman-collection.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/postman-collection.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
index b2316bd..9e7a9fc 100644
--- a/base/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/prefix-items.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
index 17a3209..25f3fb8 100644
--- a/base/schema-javascript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/ref-id-files.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
index 8f33714..1fdaef4 100644
--- a/base/schema-javascript/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/ref-id-files.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/ref-remote.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/ref-remote.schema/default/TopLevel.js
index 2374532..7cfdfa2 100644
--- a/base/schema-javascript/test/inputs/schema/ref-remote.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/ref-remote.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
index 6759356..57b66a4 100644
--- a/base/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/renaming-bug.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/required-draft3.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/required-draft3.schema/default/TopLevel.js
index 28f27ca..9d0a91b 100644
--- a/base/schema-javascript/test/inputs/schema/required-draft3.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/required-draft3.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/required-non-properties.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
index 4f4880b..cb00d70 100644
--- a/base/schema-javascript/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/required-non-properties.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/required.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/required.schema/default/TopLevel.js
index 28f27ca..9d0a91b 100644
--- a/base/schema-javascript/test/inputs/schema/required.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/required.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
index c5a3d56..dc9a19d 100644
--- a/base/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/schema-constraints.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
index 90aacfd..e94c2b9 100644
--- a/base/schema-javascript/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/schema-constraints.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/simple-ref.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/simple-ref.schema/default/TopLevel.js
index 2374532..7cfdfa2 100644
--- a/base/schema-javascript/test/inputs/schema/simple-ref.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/simple-ref.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/strict-optional.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/strict-optional.schema/default/TopLevel.js
index fc674aa..e506dee 100644
--- a/base/schema-javascript/test/inputs/schema/strict-optional.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/strict-optional.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/top-level-array.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/top-level-array.schema/default/TopLevel.js
index c52556d..28a7dd8 100644
--- a/base/schema-javascript/test/inputs/schema/top-level-array.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/top-level-array.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/top-level-enum.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
index a86a1a2..186c7ca 100644
--- a/base/schema-javascript/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/top-level-enum.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
index b35df94..3d43ec6 100644
--- a/base/schema-javascript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
index 28cb102..0f26ab9 100644
--- a/base/schema-javascript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/tuple.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/tuple.schema/default/TopLevel.js
index 0d95545..71acd02 100644
--- a/base/schema-javascript/test/inputs/schema/tuple.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/tuple.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
index 2608ea9..59da8a4 100644
--- a/base/schema-javascript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
index d82c497..7dbdb10 100644
--- a/base/schema-javascript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/union-int-double.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/union-int-double.schema/default/TopLevel.js
index 02359d9..9cd2c26 100644
--- a/base/schema-javascript/test/inputs/schema/union-int-double.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/union-int-double.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/union-list.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/union-list.schema/default/TopLevel.js
index a10786e..4b29dbb 100644
--- a/base/schema-javascript/test/inputs/schema/union-list.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/union-list.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/union.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/union.schema/default/TopLevel.js
index 7b9e08f..d3722b4 100644
--- a/base/schema-javascript/test/inputs/schema/union.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/union.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
index 4694515..8af7e1c 100644
--- a/base/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/uuid.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js b/head/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
index 61dcf18..bd3068c 100644
--- a/base/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
+++ b/head/schema-javascript/test/inputs/schema/vega-lite.schema/default/TopLevel.js
@@ -90,10 +90,15 @@ function transform(val, typ, getProps, key = '', parent = '') {
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
index eb5c28b..15de886 100644
--- a/base/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/accessors.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
index 3a1e7c3..052d7b8 100644
--- a/base/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/all-of-additional-properties-false.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/any.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/any.schema/default/TopLevel.ts
index 293a64c..c8fc58a 100644
--- a/base/schema-typescript/test/inputs/schema/any.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/any.schema/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
index 8604379..5c173e3 100644
--- a/base/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/bool-string.schema/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
index f2945d4..6e9b2ff 100644
--- a/base/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/boolean-subschema.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/camelCase.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/camelCase.schema/default/TopLevel.ts
index 1c2f56a..cbd2cc3 100644
--- a/base/schema-typescript/test/inputs/schema/camelCase.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/camelCase.schema/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/class-map-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/class-map-union.schema/default/TopLevel.ts
index dedacb8..cf00c09 100644
--- a/base/schema-typescript/test/inputs/schema/class-map-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/class-map-union.schema/default/TopLevel.ts
@@ -113,10 +113,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/class-with-additional.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/class-with-additional.schema/default/TopLevel.ts
index 15df75c..841d828 100644
--- a/base/schema-typescript/test/inputs/schema/class-with-additional.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/class-with-additional.schema/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
index 934c40e..8b95765 100644
--- a/base/schema-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/comment-injection-enum-nested-comment.schema/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
index 2a64dc5..a2cb294 100644
--- a/base/schema-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/comment-injection-enum.schema/default/TopLevel.ts
@@ -116,10 +116,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
index 504b925..4e63492 100644
--- a/base/schema-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/comment-injection-nested-comment.schema/default/TopLevel.ts
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
index 7b4e86e..b741906 100644
--- a/base/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/comment-injection.schema/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
index 471597a..0e87de9 100644
--- a/base/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/const-non-string.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/constructor.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/constructor.schema/default/TopLevel.ts
index 213c0ae..994bb02 100644
--- a/base/schema-typescript/test/inputs/schema/constructor.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/constructor.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/cut-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/cut-enum.schema/default/TopLevel.ts
index 4b340a1..e3e13d6 100644
--- a/base/schema-typescript/test/inputs/schema/cut-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/cut-enum.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
index f2f2b10..fd23a30 100644
--- a/base/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/date-time-or-string.schema/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
index 4427935..27f5426 100644
--- a/base/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/date-time.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/default-value.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/default-value.schema/default/TopLevel.ts
index 3b6063c..c89e9b3 100644
--- a/base/schema-typescript/test/inputs/schema/default-value.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/default-value.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.ts
index 5fa5b81..ac1d1cf 100644
--- a/base/schema-typescript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/description-with-double-quotes.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
index 239362c..ef14f47 100644
--- a/base/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/description.schema/default/TopLevel.ts
@@ -133,10 +133,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
index 7c30718..ad0e766 100644
--- a/base/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/direct-union.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/empty-object.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/empty-object.schema/default/TopLevel.ts
index ad5255b..1c5fb57 100644
--- a/base/schema-typescript/test/inputs/schema/empty-object.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/empty-object.schema/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/enum-large.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/enum-large.schema/default/TopLevel.ts
index 12c52ac..83c9463 100644
--- a/base/schema-typescript/test/inputs/schema/enum-large.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/enum-large.schema/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/enum-with-null.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/enum-with-null.schema/default/TopLevel.ts
index faf205e..709a0a3 100644
--- a/base/schema-typescript/test/inputs/schema/enum-with-null.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/enum-with-null.schema/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/enum-with-values.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/enum-with-values.schema/default/TopLevel.ts
index 0d0c447..22fd2b0 100644
--- a/base/schema-typescript/test/inputs/schema/enum-with-values.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/enum-with-values.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
index 368ac2b..b34efc4 100644
--- a/base/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/enum.schema/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.ts
index 8ea70f3..a84cee1 100644
--- a/base/schema-typescript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/fractional-bounds.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.ts
index fc206e1..40aa1a4 100644
--- a/base/schema-typescript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/go-schema-pattern-properties.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.ts
index e07edf0..6fc80a6 100644
--- a/base/schema-typescript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/haskell-enum-forbidden.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/id-no-address.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/id-no-address.schema/default/TopLevel.ts
index 29bc994..f3e2150 100644
--- a/base/schema-typescript/test/inputs/schema/id-no-address.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/id-no-address.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/id-root.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/id-root.schema/default/TopLevel.ts
index 444933f..a54e3cc 100644
--- a/base/schema-typescript/test/inputs/schema/id-root.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/id-root.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.ts
index 9d2df90..396acb2 100644
--- a/base/schema-typescript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/ie-suffix-singularization.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.ts
index 9f7b670..c0acf5e 100644
--- a/base/schema-typescript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/implicit-all-of.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.ts
index 887b34d..4a146d2 100644
--- a/base/schema-typescript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/implicit-class-array-union.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.ts
index 8345516..74a3442 100644
--- a/base/schema-typescript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/implicit-one-of.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/integer-before-number.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-before-number.schema/default/TopLevel.ts
index 6e4d1cf..cae4ec8 100644
--- a/base/schema-typescript/test/inputs/schema/integer-before-number.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-before-number.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/integer-float-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-float-union.schema/default/TopLevel.ts
index 30bbefd..8cec423 100644
--- a/base/schema-typescript/test/inputs/schema/integer-float-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-float-union.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
index f9a36b5..71adc70 100644
--- a/base/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-string.schema/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
index 54caffa..0bab211 100644
--- a/base/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/integer-type.schema/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/intersection-nested.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/intersection-nested.schema/default/TopLevel.ts
index 2d9a3b2..2315801 100644
--- a/base/schema-typescript/test/inputs/schema/intersection-nested.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/intersection-nested.schema/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/intersection.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/intersection.schema/default/TopLevel.ts
index 29a519e..0855871 100644
--- a/base/schema-typescript/test/inputs/schema/intersection.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/intersection.schema/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.ts
index 9f9b3d6..1b8258a 100644
--- a/base/schema-typescript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/issue2680-top-level-array.schema/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/keyword-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/keyword-enum.schema/default/TopLevel.ts
index e90b8c1..86fd73e 100644
--- a/base/schema-typescript/test/inputs/schema/keyword-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/keyword-enum.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/keyword-unions.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/keyword-unions.schema/default/TopLevel.ts
index 95fb785..0d15c07 100644
--- a/base/schema-typescript/test/inputs/schema/keyword-unions.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/keyword-unions.schema/default/TopLevel.ts
@@ -1093,10 +1093,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
index a84e1b1..20badb6 100644
--- a/base/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/light.schema/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/list.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/list.schema/default/TopLevel.ts
index a3e9b2b..15a1a97 100644
--- a/base/schema-typescript/test/inputs/schema/list.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/list.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
index a88d16b..28850db 100644
--- a/base/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/min-max-items.schema/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
index 4d15bf4..34a7b7d 100644
--- a/base/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmax-integer.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
index 74eb204..31081e8 100644
--- a/base/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmax.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
index ce21e9c..853a3df 100644
--- a/base/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.ts
index 2ac8eea..0f1736f 100644
--- a/base/schema-typescript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/multi-type-enum.schema/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.ts
index 332f39c..b5a9bdb 100644
--- a/base/schema-typescript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/mutually-recursive.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.ts
index 8501247..9eac72a 100644
--- a/base/schema-typescript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/nested-intersection-union.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
index 9dd48da..cbf267b 100644
--- a/base/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/non-standard-ref.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
index d59ca93..ff2699b 100644
--- a/base/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/nullable-optional-one-of.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/object-type-required.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/object-type-required.schema/default/TopLevel.ts
index 8a93edc..ebc463e 100644
--- a/base/schema-typescript/test/inputs/schema/object-type-required.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/object-type-required.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
index 21f335b..23c0a31 100644
--- a/base/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-any.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
index 1d6ca31..fe9a86d 100644
--- a/base/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
index 8cf1679..1b1f372 100644
--- a/base/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
index c6d057f..cf2b99f 100644
--- a/base/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-date-time.schema/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-enum.schema/default/TopLevel.ts
index 0f2ad1e..a200d82 100644
--- a/base/schema-typescript/test/inputs/schema/optional-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-enum.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/optional-property.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/optional-property.schema/default/TopLevel.ts
index 5d84647..5b763bd 100644
--- a/base/schema-typescript/test/inputs/schema/optional-property.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/optional-property.schema/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/pattern.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/pattern.schema/default/TopLevel.ts
index f596bff..8b14521 100644
--- a/base/schema-typescript/test/inputs/schema/pattern.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/pattern.schema/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/postman-collection.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/postman-collection.schema/default/TopLevel.ts
index 34dfb4e..9e875b1 100644
--- a/base/schema-typescript/test/inputs/schema/postman-collection.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/postman-collection.schema/default/TopLevel.ts
@@ -107,10 +107,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
index ee2e5bf..db56f7c 100644
--- a/base/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/prefix-items.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.ts
index 3fc7608..e6cc499 100644
--- a/base/schema-typescript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/recursive-union-flattening.schema/default/TopLevel.ts
@@ -110,10 +110,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/ref-id-files.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/ref-id-files.schema/default/TopLevel.ts
index 4b340a1..e3e13d6 100644
--- a/base/schema-typescript/test/inputs/schema/ref-id-files.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/ref-id-files.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/ref-remote.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/ref-remote.schema/default/TopLevel.ts
index a3e9b2b..15a1a97 100644
--- a/base/schema-typescript/test/inputs/schema/ref-remote.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/ref-remote.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
index f2841a1..adc564c 100644
--- a/base/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
@@ -184,10 +184,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/required-draft3.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/required-draft3.schema/default/TopLevel.ts
index 5d752aa..d212362 100644
--- a/base/schema-typescript/test/inputs/schema/required-draft3.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/required-draft3.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/required-non-properties.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/required-non-properties.schema/default/TopLevel.ts
index b5a3f4a..cf8a7e8 100644
--- a/base/schema-typescript/test/inputs/schema/required-non-properties.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/required-non-properties.schema/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/required.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/required.schema/default/TopLevel.ts
index 5d752aa..d212362 100644
--- a/base/schema-typescript/test/inputs/schema/required.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/required.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
index b76a76b..d136451 100644
--- a/base/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/rust-cycle-breaker-union.schema/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
index 80dbe26..b77470d 100644
--- a/base/schema-typescript/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/simple-ref.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/simple-ref.schema/default/TopLevel.ts
index a3e9b2b..15a1a97 100644
--- a/base/schema-typescript/test/inputs/schema/simple-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/simple-ref.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/strict-optional.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/strict-optional.schema/default/TopLevel.ts
index 208356c..eabc0a6 100644
--- a/base/schema-typescript/test/inputs/schema/strict-optional.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/strict-optional.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/top-level-array.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/top-level-array.schema/default/TopLevel.ts
index bfa6424..40e213a 100644
--- a/base/schema-typescript/test/inputs/schema/top-level-array.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/top-level-array.schema/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/top-level-enum.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/top-level-enum.schema/default/TopLevel.ts
index 26d77b6..67a4122 100644
--- a/base/schema-typescript/test/inputs/schema/top-level-enum.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/top-level-enum.schema/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.ts
index eb865a8..023d6c9 100644
--- a/base/schema-typescript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/top-level-primitive-array.schema/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.ts
index e37cbbe..6e55a5e 100644
--- a/base/schema-typescript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/top-level-primitive.schema/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/tuple.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/tuple.schema/default/TopLevel.ts
index d90f7f5..db5ddd1 100644
--- a/base/schema-typescript/test/inputs/schema/tuple.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/tuple.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.ts
index 90b3f3e..80225c2 100644
--- a/base/schema-typescript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/unevaluated-properties.schema/default/TopLevel.ts
@@ -112,10 +112,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.ts
index 3da4931..1192f9e 100644
--- a/base/schema-typescript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/unicode-codepoint-length.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/union-int-double.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/union-int-double.schema/default/TopLevel.ts
index bcd40b1..b1d5b0c 100644
--- a/base/schema-typescript/test/inputs/schema/union-int-double.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/union-int-double.schema/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/union-list.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/union-list.schema/default/TopLevel.ts
index 3cfb51f..d42710e 100644
--- a/base/schema-typescript/test/inputs/schema/union-list.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/union-list.schema/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/union.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/union.schema/default/TopLevel.ts
index 1ba82fe..3188d2a 100644
--- a/base/schema-typescript/test/inputs/schema/union.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/union.schema/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
index 052065c..309108d 100644
--- a/base/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/uuid.schema/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/schema-typescript/test/inputs/schema/vega-lite.schema/default/TopLevel.ts b/head/schema-typescript/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
index 0ada8e0..7363378 100644
--- a/base/schema-typescript/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
+++ b/head/schema-typescript/test/inputs/schema/vega-lite.schema/default/TopLevel.ts
@@ -5945,10 +5945,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/00c36.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/00c36.json/default/TopLevel.ts
index a983213..c0be327 100644
--- a/base/typescript/test/inputs/json/misc/00c36.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/00c36.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/00ec5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/00ec5.json/default/TopLevel.ts
index 5ec761b..421686c 100644
--- a/base/typescript/test/inputs/json/misc/00ec5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/00ec5.json/default/TopLevel.ts
@@ -162,10 +162,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/010b1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/010b1.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/010b1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/010b1.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/016af.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/016af.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/016af.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/016af.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/033b1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/033b1.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/033b1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/033b1.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/050b0.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/050b0.json/default/TopLevel.ts
index 16de21f..d95e012 100644
--- a/base/typescript/test/inputs/json/misc/050b0.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/050b0.json/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/06bee.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/06bee.json/default/TopLevel.ts
index 5bb27b2..7410888 100644
--- a/base/typescript/test/inputs/json/misc/06bee.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/06bee.json/default/TopLevel.ts
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/07540.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/07540.json/default/TopLevel.ts
index 6e06286..746438b 100644
--- a/base/typescript/test/inputs/json/misc/07540.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/07540.json/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0779f.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0779f.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/0779f.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0779f.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/07c75.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/07c75.json/default/TopLevel.ts
index 943765c..ba5660a 100644
--- a/base/typescript/test/inputs/json/misc/07c75.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/07c75.json/default/TopLevel.ts
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/09f54.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/09f54.json/default/TopLevel.ts
index 38eedf1..cda1ee3 100644
--- a/base/typescript/test/inputs/json/misc/09f54.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/09f54.json/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0a358.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0a358.json/default/TopLevel.ts
index 4cb922c..98e3552 100644
--- a/base/typescript/test/inputs/json/misc/0a358.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0a358.json/default/TopLevel.ts
@@ -111,10 +111,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0a91a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0a91a.json/default/TopLevel.ts
index 22b91e1..797f335 100644
--- a/base/typescript/test/inputs/json/misc/0a91a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0a91a.json/default/TopLevel.ts
@@ -311,10 +311,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0b91a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0b91a.json/default/TopLevel.ts
index 507c416..01bf393 100644
--- a/base/typescript/test/inputs/json/misc/0b91a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0b91a.json/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0cffa.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0cffa.json/default/TopLevel.ts
index 49be2bd..f7add0c 100644
--- a/base/typescript/test/inputs/json/misc/0cffa.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0cffa.json/default/TopLevel.ts
@@ -204,10 +204,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0e0c2.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0e0c2.json/default/TopLevel.ts
index 7ad0a89..13b43ac 100644
--- a/base/typescript/test/inputs/json/misc/0e0c2.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0e0c2.json/default/TopLevel.ts
@@ -167,10 +167,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/0fecf.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/0fecf.json/default/TopLevel.ts
index fc2446d..6c50364 100644
--- a/base/typescript/test/inputs/json/misc/0fecf.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/0fecf.json/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/10be4.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/10be4.json/default/TopLevel.ts
index 40b751e..2cdcbb5 100644
--- a/base/typescript/test/inputs/json/misc/10be4.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/10be4.json/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/112b5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/112b5.json/default/TopLevel.ts
index 9a20499..9092f25 100644
--- a/base/typescript/test/inputs/json/misc/112b5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/112b5.json/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/127a1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/127a1.json/default/TopLevel.ts
index 649aa7f..e3eb481 100644
--- a/base/typescript/test/inputs/json/misc/127a1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/127a1.json/default/TopLevel.ts
@@ -204,10 +204,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/13d8d.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/13d8d.json/default/TopLevel.ts
index 493d608..cab0dd8 100644
--- a/base/typescript/test/inputs/json/misc/13d8d.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/13d8d.json/default/TopLevel.ts
@@ -122,10 +122,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/14d38.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/14d38.json/default/TopLevel.ts
index 4325fc0..1fe559b 100644
--- a/base/typescript/test/inputs/json/misc/14d38.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/14d38.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/167d6.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/167d6.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/167d6.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/167d6.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/16bc5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/16bc5.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/16bc5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/16bc5.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/176f1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/176f1.json/default/TopLevel.ts
index ecd58f0..ab68e80 100644
--- a/base/typescript/test/inputs/json/misc/176f1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/176f1.json/default/TopLevel.ts
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/1a7f5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/1a7f5.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/1a7f5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/1a7f5.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/1b28c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/1b28c.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/1b28c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/1b28c.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/1b409.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/1b409.json/default/TopLevel.ts
index d0d2ad2..57b4ca7 100644
--- a/base/typescript/test/inputs/json/misc/1b409.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/1b409.json/default/TopLevel.ts
@@ -170,10 +170,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/2465e.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/2465e.json/default/TopLevel.ts
index 4c9b561..24e1c91 100644
--- a/base/typescript/test/inputs/json/misc/2465e.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/2465e.json/default/TopLevel.ts
@@ -169,10 +169,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/24f52.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/24f52.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/24f52.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/24f52.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/262f0.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/262f0.json/default/TopLevel.ts
index 2f6399a..2428c6b 100644
--- a/base/typescript/test/inputs/json/misc/262f0.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/262f0.json/default/TopLevel.ts
@@ -196,10 +196,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/26b49.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/26b49.json/default/TopLevel.ts
index 154183a..53647f9 100644
--- a/base/typescript/test/inputs/json/misc/26b49.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/26b49.json/default/TopLevel.ts
@@ -203,10 +203,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/26c9c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/26c9c.json/default/TopLevel.ts
index b55faf6..be85af5 100644
--- a/base/typescript/test/inputs/json/misc/26c9c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/26c9c.json/default/TopLevel.ts
@@ -283,10 +283,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/27332.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/27332.json/default/TopLevel.ts
index 35fbe5d..a2e5961 100644
--- a/base/typescript/test/inputs/json/misc/27332.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/27332.json/default/TopLevel.ts
@@ -235,10 +235,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/29f47.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/29f47.json/default/TopLevel.ts
index c976ff4..2257a86 100644
--- a/base/typescript/test/inputs/json/misc/29f47.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/29f47.json/default/TopLevel.ts
@@ -222,10 +222,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/2d4e2.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/2d4e2.json/default/TopLevel.ts
index a7e2dd6..9362dcf 100644
--- a/base/typescript/test/inputs/json/misc/2d4e2.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/2d4e2.json/default/TopLevel.ts
@@ -180,10 +180,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/2df80.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/2df80.json/default/TopLevel.ts
index 450439c..37f6367 100644
--- a/base/typescript/test/inputs/json/misc/2df80.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/2df80.json/default/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/31189.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/31189.json/default/TopLevel.ts
index d4aaa45..792af9d 100644
--- a/base/typescript/test/inputs/json/misc/31189.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/31189.json/default/TopLevel.ts
@@ -123,10 +123,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/32431.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/32431.json/default/TopLevel.ts
index d47172c..1054a51 100644
--- a/base/typescript/test/inputs/json/misc/32431.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/32431.json/default/TopLevel.ts
@@ -159,10 +159,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/32d5c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/32d5c.json/default/TopLevel.ts
index 9774154..543bff3 100644
--- a/base/typescript/test/inputs/json/misc/32d5c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/32d5c.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/337ed.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/337ed.json/default/TopLevel.ts
index bfe127f..2be12a7 100644
--- a/base/typescript/test/inputs/json/misc/337ed.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/337ed.json/default/TopLevel.ts
@@ -154,10 +154,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/33d2e.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/33d2e.json/default/TopLevel.ts
index b2bf5c1..465863b 100644
--- a/base/typescript/test/inputs/json/misc/33d2e.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/33d2e.json/default/TopLevel.ts
@@ -137,10 +137,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/34702.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/34702.json/default/TopLevel.ts
index 695cfe1..642c4d3 100644
--- a/base/typescript/test/inputs/json/misc/34702.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/34702.json/default/TopLevel.ts
@@ -151,10 +151,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/3536b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/3536b.json/default/TopLevel.ts
index dd27fff..a432e0b 100644
--- a/base/typescript/test/inputs/json/misc/3536b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/3536b.json/default/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/3659d.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/3659d.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/3659d.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/3659d.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/36d5d.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/36d5d.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/36d5d.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/36d5d.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/3a6b3.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/3a6b3.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/3a6b3.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/3a6b3.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/3e9a3.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/3e9a3.json/default/TopLevel.ts
index ecd58f0..ab68e80 100644
--- a/base/typescript/test/inputs/json/misc/3e9a3.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/3e9a3.json/default/TopLevel.ts
@@ -121,10 +121,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/3f1ce.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/3f1ce.json/default/TopLevel.ts
index c8671c7..bdd006c 100644
--- a/base/typescript/test/inputs/json/misc/3f1ce.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/3f1ce.json/default/TopLevel.ts
@@ -196,10 +196,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/421d4.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/421d4.json/default/TopLevel.ts
index 81973fb..3b9c792 100644
--- a/base/typescript/test/inputs/json/misc/421d4.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/421d4.json/default/TopLevel.ts
@@ -207,10 +207,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/437e7.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/437e7.json/default/TopLevel.ts
index 3093256..c5beadf 100644
--- a/base/typescript/test/inputs/json/misc/437e7.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/437e7.json/default/TopLevel.ts
@@ -200,10 +200,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/43970.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/43970.json/default/TopLevel.ts
index a719de8..29c4332 100644
--- a/base/typescript/test/inputs/json/misc/43970.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/43970.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/43eaf.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/43eaf.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/43eaf.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/43eaf.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/458db.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/458db.json/default/TopLevel.ts
index 5f89b91..499d44c 100644
--- a/base/typescript/test/inputs/json/misc/458db.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/458db.json/default/TopLevel.ts
@@ -137,10 +137,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4961a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4961a.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/4961a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4961a.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4a0d7.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4a0d7.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/4a0d7.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4a0d7.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4a455.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4a455.json/default/TopLevel.ts
index 563ca2d..534cfe2 100644
--- a/base/typescript/test/inputs/json/misc/4a455.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4a455.json/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4c547.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4c547.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/4c547.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4c547.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4d6fb.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4d6fb.json/default/TopLevel.ts
index f0215d0..8fdea6a 100644
--- a/base/typescript/test/inputs/json/misc/4d6fb.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4d6fb.json/default/TopLevel.ts
@@ -234,10 +234,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/4e336.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/4e336.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/4e336.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/4e336.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/54147.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/54147.json/default/TopLevel.ts
index 021ff27..0e2da69 100644
--- a/base/typescript/test/inputs/json/misc/54147.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/54147.json/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/54d32.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/54d32.json/default/TopLevel.ts
index 38f7422..9b6e27e 100644
--- a/base/typescript/test/inputs/json/misc/54d32.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/54d32.json/default/TopLevel.ts
@@ -113,10 +113,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/570ec.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/570ec.json/default/TopLevel.ts
index 4d6318e..12e46ad 100644
--- a/base/typescript/test/inputs/json/misc/570ec.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/570ec.json/default/TopLevel.ts
@@ -128,10 +128,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/5dd0d.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/5dd0d.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/5dd0d.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/5dd0d.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/5eae5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/5eae5.json/default/TopLevel.ts
index 1ec275a..9aea60a 100644
--- a/base/typescript/test/inputs/json/misc/5eae5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/5eae5.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/5eb20.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/5eb20.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/5eb20.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/5eb20.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/5f3a1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/5f3a1.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/5f3a1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/5f3a1.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/5f7fe.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/5f7fe.json/default/TopLevel.ts
index c0a3d03..f923590 100644
--- a/base/typescript/test/inputs/json/misc/5f7fe.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/5f7fe.json/default/TopLevel.ts
@@ -281,10 +281,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/617e8.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/617e8.json/default/TopLevel.ts
index 2c1281b..3d8b5d2 100644
--- a/base/typescript/test/inputs/json/misc/617e8.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/617e8.json/default/TopLevel.ts
@@ -280,10 +280,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/61b66.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/61b66.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/61b66.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/61b66.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6260a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6260a.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/6260a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6260a.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/65dec.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/65dec.json/default/TopLevel.ts
index 9324220..c2e19ac 100644
--- a/base/typescript/test/inputs/json/misc/65dec.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/65dec.json/default/TopLevel.ts
@@ -159,10 +159,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/66121.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/66121.json/default/TopLevel.ts
index 9830cd5..64f8c5e 100644
--- a/base/typescript/test/inputs/json/misc/66121.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/66121.json/default/TopLevel.ts
@@ -131,10 +131,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6617c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6617c.json/default/TopLevel.ts
index 01ea72d..188c749 100644
--- a/base/typescript/test/inputs/json/misc/6617c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6617c.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/67c03.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/67c03.json/default/TopLevel.ts
index 078e091..f2f5e7e 100644
--- a/base/typescript/test/inputs/json/misc/67c03.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/67c03.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/68c30.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/68c30.json/default/TopLevel.ts
index 821bced..ff629c9 100644
--- a/base/typescript/test/inputs/json/misc/68c30.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/68c30.json/default/TopLevel.ts
@@ -127,10 +127,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6c155.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6c155.json/default/TopLevel.ts
index fb256a3..d65d0cb 100644
--- a/base/typescript/test/inputs/json/misc/6c155.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6c155.json/default/TopLevel.ts
@@ -149,10 +149,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6de06.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6de06.json/default/TopLevel.ts
index d66b8fa..6163083 100644
--- a/base/typescript/test/inputs/json/misc/6de06.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6de06.json/default/TopLevel.ts
@@ -239,10 +239,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6dec6.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6dec6.json/default/TopLevel.ts
index 6e2745b..e5fa6c8 100644
--- a/base/typescript/test/inputs/json/misc/6dec6.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6dec6.json/default/TopLevel.ts
@@ -196,10 +196,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/6eb00.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/6eb00.json/default/TopLevel.ts
index 63835a1..b6cb20d 100644
--- a/base/typescript/test/inputs/json/misc/6eb00.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/6eb00.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/70c77.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/70c77.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/70c77.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/70c77.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/734ad.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/734ad.json/default/TopLevel.ts
index 7f98792..2757040 100644
--- a/base/typescript/test/inputs/json/misc/734ad.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/734ad.json/default/TopLevel.ts
@@ -165,10 +165,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/75912.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/75912.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/75912.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/75912.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7681c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7681c.json/default/TopLevel.ts
index 2c8c3d5..e637d17 100644
--- a/base/typescript/test/inputs/json/misc/7681c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7681c.json/default/TopLevel.ts
@@ -204,10 +204,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/76ae1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/76ae1.json/default/TopLevel.ts
index 1ff30e6..a3f9211 100644
--- a/base/typescript/test/inputs/json/misc/76ae1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/76ae1.json/default/TopLevel.ts
@@ -277,10 +277,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/77392.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/77392.json/default/TopLevel.ts
index bd1d90f..208c448 100644
--- a/base/typescript/test/inputs/json/misc/77392.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/77392.json/default/TopLevel.ts
@@ -111,10 +111,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7d397.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7d397.json/default/TopLevel.ts
index cca1a7e..4c74c1e 100644
--- a/base/typescript/test/inputs/json/misc/7d397.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7d397.json/default/TopLevel.ts
@@ -169,10 +169,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7d722.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7d722.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/7d722.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7d722.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7df41.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7df41.json/default/TopLevel.ts
index 8bb0df8..7743b06 100644
--- a/base/typescript/test/inputs/json/misc/7df41.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7df41.json/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7dfa6.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7dfa6.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/7dfa6.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7dfa6.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7eb30.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7eb30.json/default/TopLevel.ts
index a522f6b..b26ed53 100644
--- a/base/typescript/test/inputs/json/misc/7eb30.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7eb30.json/default/TopLevel.ts
@@ -133,10 +133,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7f568.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7f568.json/default/TopLevel.ts
index 908a330..47c08f8 100644
--- a/base/typescript/test/inputs/json/misc/7f568.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7f568.json/default/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/7fbfb.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/7fbfb.json/default/TopLevel.ts
index 6884826..bd6cc04 100644
--- a/base/typescript/test/inputs/json/misc/7fbfb.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/7fbfb.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/80aff.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/80aff.json/default/TopLevel.ts
index 7393e16..7d52a96 100644
--- a/base/typescript/test/inputs/json/misc/80aff.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/80aff.json/default/TopLevel.ts
@@ -112,10 +112,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/82509.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/82509.json/default/TopLevel.ts
index 3b002b1..9313e0a 100644
--- a/base/typescript/test/inputs/json/misc/82509.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/82509.json/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/8592b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/8592b.json/default/TopLevel.ts
index b0907a4..72b3a58 100644
--- a/base/typescript/test/inputs/json/misc/8592b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/8592b.json/default/TopLevel.ts
@@ -208,10 +208,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/88130.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/88130.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/88130.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/88130.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/8a62c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/8a62c.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/8a62c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/8a62c.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/908db.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/908db.json/default/TopLevel.ts
index 071e0d8..eb8f1f4 100644
--- a/base/typescript/test/inputs/json/misc/908db.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/908db.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9617f.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9617f.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/9617f.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9617f.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/96f7c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/96f7c.json/default/TopLevel.ts
index 900a451..6e03025 100644
--- a/base/typescript/test/inputs/json/misc/96f7c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/96f7c.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9847b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9847b.json/default/TopLevel.ts
index b1f7df7..5fac106 100644
--- a/base/typescript/test/inputs/json/misc/9847b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9847b.json/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9929c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9929c.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/9929c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9929c.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/996bd.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/996bd.json/default/TopLevel.ts
index d940071..86d9a5d 100644
--- a/base/typescript/test/inputs/json/misc/996bd.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/996bd.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9a503.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9a503.json/default/TopLevel.ts
index a7ce96f..55be439 100644
--- a/base/typescript/test/inputs/json/misc/9a503.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9a503.json/default/TopLevel.ts
@@ -123,10 +123,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9ac3b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9ac3b.json/default/TopLevel.ts
index 9f4c57f..dd20a95 100644
--- a/base/typescript/test/inputs/json/misc/9ac3b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9ac3b.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/9eed5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/9eed5.json/default/TopLevel.ts
index f2587f8..e008698 100644
--- a/base/typescript/test/inputs/json/misc/9eed5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/9eed5.json/default/TopLevel.ts
@@ -123,10 +123,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a0496.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a0496.json/default/TopLevel.ts
index b1b15e4..3fd58ff 100644
--- a/base/typescript/test/inputs/json/misc/a0496.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a0496.json/default/TopLevel.ts
@@ -114,10 +114,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a1eca.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a1eca.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/a1eca.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a1eca.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a3d8c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a3d8c.json/default/TopLevel.ts
index e16a8f2..d5df3fa 100644
--- a/base/typescript/test/inputs/json/misc/a3d8c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a3d8c.json/default/TopLevel.ts
@@ -206,10 +206,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a45b0.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a45b0.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/a45b0.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a45b0.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a71df.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a71df.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/a71df.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a71df.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/a9691.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/a9691.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/a9691.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/a9691.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ab0d1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ab0d1.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/ab0d1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ab0d1.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/abb4b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/abb4b.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/abb4b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/abb4b.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ac944.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ac944.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/ac944.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ac944.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ad8be.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ad8be.json/default/TopLevel.ts
index 40b751e..2cdcbb5 100644
--- a/base/typescript/test/inputs/json/misc/ad8be.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ad8be.json/default/TopLevel.ts
@@ -136,10 +136,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ae7f0.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ae7f0.json/default/TopLevel.ts
index faecb0c..1319e98 100644
--- a/base/typescript/test/inputs/json/misc/ae7f0.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ae7f0.json/default/TopLevel.ts
@@ -184,10 +184,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ae9ca.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ae9ca.json/default/TopLevel.ts
index 697ca29..720be74 100644
--- a/base/typescript/test/inputs/json/misc/ae9ca.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ae9ca.json/default/TopLevel.ts
@@ -132,10 +132,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/af2d1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/af2d1.json/default/TopLevel.ts
index 9bb1083..aab488f 100644
--- a/base/typescript/test/inputs/json/misc/af2d1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/af2d1.json/default/TopLevel.ts
@@ -182,10 +182,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/b4865.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/b4865.json/default/TopLevel.ts
index 62b85c8..524a73b 100644
--- a/base/typescript/test/inputs/json/misc/b4865.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/b4865.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/b6f2c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/b6f2c.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/b6f2c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/b6f2c.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/b6fe5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/b6fe5.json/default/TopLevel.ts
index cc93842..a4169ac 100644
--- a/base/typescript/test/inputs/json/misc/b6fe5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/b6fe5.json/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/b9f64.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/b9f64.json/default/TopLevel.ts
index bff8ceb..fe6c76b 100644
--- a/base/typescript/test/inputs/json/misc/b9f64.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/b9f64.json/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/bb1ec.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/bb1ec.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/bb1ec.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/bb1ec.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/be234.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/be234.json/default/TopLevel.ts
index 62b7427..aaadde5 100644
--- a/base/typescript/test/inputs/json/misc/be234.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/be234.json/default/TopLevel.ts
@@ -245,10 +245,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/c0356.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/c0356.json/default/TopLevel.ts
index 5489e4d..317ec0a 100644
--- a/base/typescript/test/inputs/json/misc/c0356.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/c0356.json/default/TopLevel.ts
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/c0a3a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/c0a3a.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/c0a3a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/c0a3a.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/c3303.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/c3303.json/default/TopLevel.ts
index afcc259..8f1f0a6 100644
--- a/base/typescript/test/inputs/json/misc/c3303.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/c3303.json/default/TopLevel.ts
@@ -203,10 +203,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/c6cfd.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/c6cfd.json/default/TopLevel.ts
index 766e801..1f47392 100644
--- a/base/typescript/test/inputs/json/misc/c6cfd.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/c6cfd.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/c8c7e.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/c8c7e.json/default/TopLevel.ts
index 6cc0632..632dc4c 100644
--- a/base/typescript/test/inputs/json/misc/c8c7e.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/c8c7e.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cb0cc.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cb0cc.json/default/TopLevel.ts
index 185febd..61d5577 100644
--- a/base/typescript/test/inputs/json/misc/cb0cc.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cb0cc.json/default/TopLevel.ts
@@ -113,10 +113,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cb81e.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cb81e.json/default/TopLevel.ts
index 30b8696..4987439 100644
--- a/base/typescript/test/inputs/json/misc/cb81e.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cb81e.json/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ccd18.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ccd18.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/ccd18.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ccd18.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cd238.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cd238.json/default/TopLevel.ts
index 05276b1..ae17f49 100644
--- a/base/typescript/test/inputs/json/misc/cd238.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cd238.json/default/TopLevel.ts
@@ -129,10 +129,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cd463.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cd463.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/cd463.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cd463.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cda6c.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cda6c.json/default/TopLevel.ts
index 02abac0..e624f4d 100644
--- a/base/typescript/test/inputs/json/misc/cda6c.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cda6c.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cf0d8.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cf0d8.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/cf0d8.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cf0d8.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/cfbce.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/cfbce.json/default/TopLevel.ts
index 51c34f0..1d42134 100644
--- a/base/typescript/test/inputs/json/misc/cfbce.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/cfbce.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/d0908.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/d0908.json/default/TopLevel.ts
index 824027c..5b9061d 100644
--- a/base/typescript/test/inputs/json/misc/d0908.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/d0908.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/d23d5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/d23d5.json/default/TopLevel.ts
index 20b6f90..1421fb3 100644
--- a/base/typescript/test/inputs/json/misc/d23d5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/d23d5.json/default/TopLevel.ts
@@ -111,10 +111,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/dbfb3.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/dbfb3.json/default/TopLevel.ts
index b728093..7894bff 100644
--- a/base/typescript/test/inputs/json/misc/dbfb3.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/dbfb3.json/default/TopLevel.ts
@@ -196,10 +196,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/dc44f.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/dc44f.json/default/TopLevel.ts
index 700fadf..08c27f6 100644
--- a/base/typescript/test/inputs/json/misc/dc44f.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/dc44f.json/default/TopLevel.ts
@@ -164,10 +164,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/dd1ce.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/dd1ce.json/default/TopLevel.ts
index 700fadf..08c27f6 100644
--- a/base/typescript/test/inputs/json/misc/dd1ce.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/dd1ce.json/default/TopLevel.ts
@@ -164,10 +164,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/dec3a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/dec3a.json/default/TopLevel.ts
index 1d071df..ca3585a 100644
--- a/base/typescript/test/inputs/json/misc/dec3a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/dec3a.json/default/TopLevel.ts
@@ -157,10 +157,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/df957.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/df957.json/default/TopLevel.ts
index 5e66d83..a751ea5 100644
--- a/base/typescript/test/inputs/json/misc/df957.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/df957.json/default/TopLevel.ts
@@ -194,10 +194,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e0ac7.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e0ac7.json/default/TopLevel.ts
index 5f4da6f..6810d4c 100644
--- a/base/typescript/test/inputs/json/misc/e0ac7.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e0ac7.json/default/TopLevel.ts
@@ -202,10 +202,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e2915.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e2915.json/default/TopLevel.ts
index e19dd6e..4b2d275 100644
--- a/base/typescript/test/inputs/json/misc/e2915.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e2915.json/default/TopLevel.ts
@@ -196,10 +196,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e2a58.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e2a58.json/default/TopLevel.ts
index 88ed88f..e2f0bc5 100644
--- a/base/typescript/test/inputs/json/misc/e2a58.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e2a58.json/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e324e.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e324e.json/default/TopLevel.ts
index b2a72cd..fb23bdf 100644
--- a/base/typescript/test/inputs/json/misc/e324e.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e324e.json/default/TopLevel.ts
@@ -167,10 +167,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e53b5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e53b5.json/default/TopLevel.ts
index 0216fc7..3cfd531 100644
--- a/base/typescript/test/inputs/json/misc/e53b5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e53b5.json/default/TopLevel.ts
@@ -120,10 +120,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e64a0.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e64a0.json/default/TopLevel.ts
index 9a20499..9092f25 100644
--- a/base/typescript/test/inputs/json/misc/e64a0.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e64a0.json/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e8a0b.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e8a0b.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/e8a0b.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e8a0b.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/e8b04.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/e8b04.json/default/TopLevel.ts
index 3bc4f02..dc12bfc 100644
--- a/base/typescript/test/inputs/json/misc/e8b04.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/e8b04.json/default/TopLevel.ts
@@ -327,10 +327,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/ed095.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/ed095.json/default/TopLevel.ts
index 281babf..5f4b4ed 100644
--- a/base/typescript/test/inputs/json/misc/ed095.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/ed095.json/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f22f5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f22f5.json/default/TopLevel.ts
index 9c3cfa0..4a47bfb 100644
--- a/base/typescript/test/inputs/json/misc/f22f5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f22f5.json/default/TopLevel.ts
@@ -182,10 +182,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f3139.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f3139.json/default/TopLevel.ts
index b1f7df7..5fac106 100644
--- a/base/typescript/test/inputs/json/misc/f3139.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f3139.json/default/TopLevel.ts
@@ -99,10 +99,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f3edf.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f3edf.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/f3edf.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f3edf.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f466a.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f466a.json/default/TopLevel.ts
index d624211..0ee4776 100644
--- a/base/typescript/test/inputs/json/misc/f466a.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f466a.json/default/TopLevel.ts
@@ -105,10 +105,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f6a65.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f6a65.json/default/TopLevel.ts
index 0388eb4..9d3530a 100644
--- a/base/typescript/test/inputs/json/misc/f6a65.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f6a65.json/default/TopLevel.ts
@@ -204,10 +204,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f74d5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f74d5.json/default/TopLevel.ts
index e74ebdb..f041cd4 100644
--- a/base/typescript/test/inputs/json/misc/f74d5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f74d5.json/default/TopLevel.ts
@@ -206,10 +206,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f82d9.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f82d9.json/default/TopLevel.ts
index e8bc876..b4eda77 100644
--- a/base/typescript/test/inputs/json/misc/f82d9.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f82d9.json/default/TopLevel.ts
@@ -180,10 +180,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/f974d.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/f974d.json/default/TopLevel.ts
index f045824..1e2d45e 100644
--- a/base/typescript/test/inputs/json/misc/f974d.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/f974d.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/faff5.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/faff5.json/default/TopLevel.ts
index 41f69ac..8b93687 100644
--- a/base/typescript/test/inputs/json/misc/faff5.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/faff5.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/fcca3.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/fcca3.json/default/TopLevel.ts
index a9e8711..ecfb540 100644
--- a/base/typescript/test/inputs/json/misc/fcca3.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/fcca3.json/default/TopLevel.ts
@@ -306,10 +306,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/misc/fd329.json/default/TopLevel.ts b/head/typescript/test/inputs/json/misc/fd329.json/default/TopLevel.ts
index 38eedf1..cda1ee3 100644
--- a/base/typescript/test/inputs/json/misc/fd329.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/misc/fd329.json/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/blns-object.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/blns-object.json/default/TopLevel.ts
index 75c36fd..8810fcc 100644
--- a/base/typescript/test/inputs/json/priority/blns-object.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/blns-object.json/default/TopLevel.ts
@@ -691,10 +691,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug2037.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug2037.json/default/TopLevel.ts
index b7774e3..8df39e5 100644
--- a/base/typescript/test/inputs/json/priority/bug2037.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug2037.json/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug2521.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug2521.json/default/TopLevel.ts
index 71bdb20..9d96633 100644
--- a/base/typescript/test/inputs/json/priority/bug2521.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug2521.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug2590.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug2590.json/default/TopLevel.ts
index 6f1b3c3..053f500 100644
--- a/base/typescript/test/inputs/json/priority/bug2590.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug2590.json/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug2663.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug2663.json/default/TopLevel.ts
index 551b34c..50059cf 100644
--- a/base/typescript/test/inputs/json/priority/bug2663.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug2663.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug2793.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug2793.json/default/TopLevel.ts
index 21337ab..32d6530 100644
--- a/base/typescript/test/inputs/json/priority/bug2793.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug2793.json/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug427.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug427.json/default/TopLevel.ts
index ce49d3d..7d10525 100644
--- a/base/typescript/test/inputs/json/priority/bug427.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug427.json/default/TopLevel.ts
@@ -653,10 +653,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug790.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug790.json/default/TopLevel.ts
index 72f464b..ce20e2b 100644
--- a/base/typescript/test/inputs/json/priority/bug790.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug790.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug855-short.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug855-short.json/default/TopLevel.ts
index 3d18c2a..a03854d 100644
--- a/base/typescript/test/inputs/json/priority/bug855-short.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug855-short.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/bug863.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/bug863.json/default/TopLevel.ts
index 1d678fc..a2b9868 100644
--- a/base/typescript/test/inputs/json/priority/bug863.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/bug863.json/default/TopLevel.ts
@@ -166,10 +166,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.ts
index 48962b7..f1cd3b5 100644
--- a/base/typescript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/coin-pairs.json/default/TopLevel.ts
@@ -108,10 +108,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
index 542710c..41a06c5 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/converters-all-objects--3a443babd1cb/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/converters-all-objects--3a443babd1cb/TopLevel.ts
index 405bb56..7c9cf7b 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/converters-all-objects--3a443babd1cb/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/converters-all-objects--3a443babd1cb/TopLevel.ts
@@ -592,10 +592,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/default/TopLevel.ts
index 542710c..41a06c5 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/default/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
index fd0686c..f5feab8 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
index 542710c..41a06c5 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-types-true--df33e18681f9/TopLevel.ts
index c459d41..3e06633 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
index 542710c..41a06c5 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
index 542710c..41a06c5 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.ts
index 9fa0df5..5c398d8 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/raw-type-any--474b307c39db/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/readonly-true--24da4fc107df/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/readonly-true--24da4fc107df/TopLevel.ts
index 77a2ff0..421bef2 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/readonly-true--24da4fc107df/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/readonly-true--24da4fc107df/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
index baa7c41..8cb10e2 100644
--- a/base/typescript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations1.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
@@ -488,10 +488,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
index 0cf2c61..4f94139 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/converters-all-objects--3a443babd1cb/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/converters-all-objects--3a443babd1cb/TopLevel.ts
index 7af1f47..28b6e2f 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/converters-all-objects--3a443babd1cb/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/converters-all-objects--3a443babd1cb/TopLevel.ts
@@ -520,10 +520,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/default/TopLevel.ts
index 0cf2c61..4f94139 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/default/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
index a998694..0e9e33e 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
index 0cf2c61..4f94139 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-types-true--df33e18681f9/TopLevel.ts
index dd1c517..2d9d05c 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
index 0cf2c61..4f94139 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
index 0cf2c61..4f94139 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.ts
index 9b327ea..f174ab2 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/raw-type-any--474b307c39db/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/readonly-true--24da4fc107df/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/readonly-true--24da4fc107df/TopLevel.ts
index 0add202..61df619 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/readonly-true--24da4fc107df/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/readonly-true--24da4fc107df/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
index 9ee5cc8..816b638 100644
--- a/base/typescript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations2.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
@@ -440,10 +440,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
index deeb945..4c64d25 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/converters-all-objects--3a443babd1cb/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/converters-all-objects--3a443babd1cb/TopLevel.ts
index dca1901..76a3c6a 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/converters-all-objects--3a443babd1cb/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/converters-all-objects--3a443babd1cb/TopLevel.ts
@@ -656,10 +656,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/default/TopLevel.ts
index deeb945..4c64d25 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/default/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
index c4ee62d..aa717c4 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
index deeb945..4c64d25 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-types-true--df33e18681f9/TopLevel.ts
index bab6e2e..15a61d5 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
index deeb945..4c64d25 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
index deeb945..4c64d25 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.ts
index 66a975d..1605e8a 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/raw-type-any--474b307c39db/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/readonly-true--24da4fc107df/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/readonly-true--24da4fc107df/TopLevel.ts
index 9ddb448..af63ce5 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/readonly-true--24da4fc107df/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/readonly-true--24da4fc107df/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
index ce3c4d5..4155baa 100644
--- a/base/typescript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations3.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
@@ -544,10 +544,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
index c743e3a..1ba256c 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/acronym-style-pascal--d9e0c1bd777a/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/converters-all-objects--3a443babd1cb/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/converters-all-objects--3a443babd1cb/TopLevel.ts
index 32879ba..c3c402f 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/converters-all-objects--3a443babd1cb/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/converters-all-objects--3a443babd1cb/TopLevel.ts
@@ -742,10 +742,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/default/TopLevel.ts
index c743e3a..1ba256c 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/default/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
index a531c43..6c85159 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/nice-property-names-true--f4d7920ee2ce/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
index c743e3a..1ba256c 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-const-values-true--6b26e4d1265c/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-types-true--df33e18681f9/TopLevel.ts
index 33bfc62..63d4ee6 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
index c743e3a..1ba256c 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-unions-false--a5053c0a486d/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
index c743e3a..1ba256c 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/prefer-unknown-false--f1ab9e45d823/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.ts
index db8aa65..f8035a6 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/raw-type-any--474b307c39db/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/readonly-true--24da4fc107df/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/readonly-true--24da4fc107df/TopLevel.ts
index 095a16c..41cb890 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/readonly-true--24da4fc107df/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/readonly-true--24da4fc107df/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts b/head/typescript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
index 95b3291..eca522a 100644
--- a/base/typescript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combinations4.json/runtime-typecheck-ignore-unknown-properties-true--d792c40f022e/TopLevel.ts
@@ -614,10 +614,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/combined-enum.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/combined-enum.json/default/TopLevel.ts
index 37bdf50..e6588db 100644
--- a/base/typescript/test/inputs/json/priority/combined-enum.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/combined-enum.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.ts
index 2d5cdbd..6f15eab 100644
--- a/base/typescript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/direct-recursive.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/empty-enum.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/empty-enum.json/default/TopLevel.ts
index 7dfc6b7..89c0152 100644
--- a/base/typescript/test/inputs/json/priority/empty-enum.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/empty-enum.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/identifiers.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/identifiers.json/default/TopLevel.ts
index de42c53..bb820bd 100644
--- a/base/typescript/test/inputs/json/priority/identifiers.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/identifiers.json/default/TopLevel.ts
@@ -124,10 +124,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.ts
index c8e46d4..d78d3a6 100644
--- a/base/typescript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/issue2680-object-array.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.ts
index 9f9b3d6..1b8258a 100644
--- a/base/typescript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/issue2680-scalar-array.json/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/keywords.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/keywords.json/default/TopLevel.ts
index 9534f60..888a469 100644
--- a/base/typescript/test/inputs/json/priority/keywords.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/keywords.json/default/TopLevel.ts
@@ -1788,10 +1788,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/keywords.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/priority/keywords.json/prefer-types-true--df33e18681f9/TopLevel.ts
index f1590b7..4644dde 100644
--- a/base/typescript/test/inputs/json/priority/keywords.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/keywords.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -1788,10 +1788,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.ts
index eeab77a..4d8cfac 100644
--- a/base/typescript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/kotlin-enum-class-case-collision.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/list.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/list.json/default/TopLevel.ts
index 550a950..a746c79 100644
--- a/base/typescript/test/inputs/json/priority/list.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/list.json/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/name-style.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/name-style.json/default/TopLevel.ts
index 2bcc4e2..91f7c97 100644
--- a/base/typescript/test/inputs/json/priority/name-style.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/name-style.json/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.ts
index 26d8381..81e6cc0 100644
--- a/base/typescript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/nbl-stats.json/default/TopLevel.ts
@@ -373,10 +373,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/nested-objects.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/nested-objects.json/default/TopLevel.ts
index a1b089d..efb729e 100644
--- a/base/typescript/test/inputs/json/priority/nested-objects.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/nested-objects.json/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/no-classes.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/no-classes.json/default/TopLevel.ts
index 111e281..22038be 100644
--- a/base/typescript/test/inputs/json/priority/no-classes.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/no-classes.json/default/TopLevel.ts
@@ -94,10 +94,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.ts
index 53012a2..8f0de5f 100644
--- a/base/typescript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/nst-test-suite.json/default/TopLevel.ts
@@ -233,10 +233,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/number-map.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/number-map.json/default/TopLevel.ts
index 5acf2f5..b370ac6 100644
--- a/base/typescript/test/inputs/json/priority/number-map.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/number-map.json/default/TopLevel.ts
@@ -96,10 +96,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/omit-empty.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/omit-empty.json/default/TopLevel.ts
index 4629d9d..27b173e 100644
--- a/base/typescript/test/inputs/json/priority/omit-empty.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/omit-empty.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/optional-union.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/optional-union.json/default/TopLevel.ts
index ed9914b..4547576 100644
--- a/base/typescript/test/inputs/json/priority/optional-union.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/optional-union.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.ts
index 14ba2bd..17b0cf1 100644
--- a/base/typescript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/php-mixed-union.json/default/TopLevel.ts
@@ -102,10 +102,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/php-validation.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/php-validation.json/default/TopLevel.ts
index ffabdda..248fe95 100644
--- a/base/typescript/test/inputs/json/priority/php-validation.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/php-validation.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/recursive.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/recursive.json/default/TopLevel.ts
index 2c52978..f423b98 100644
--- a/base/typescript/test/inputs/json/priority/recursive.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/recursive.json/default/TopLevel.ts
@@ -215,10 +215,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.ts
index 61d8ad3..af5bf27 100644
--- a/base/typescript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/simple-identifiers.json/default/TopLevel.ts
@@ -104,10 +104,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.ts
index 9bf4778..c348a91 100644
--- a/base/typescript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/union-constructor-clash.json/default/TopLevel.ts
@@ -103,10 +103,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/unions.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/unions.json/default/TopLevel.ts
index 3f729e7..fa46ff7 100644
--- a/base/typescript/test/inputs/json/priority/unions.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/unions.json/default/TopLevel.ts
@@ -106,10 +106,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/url.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/url.json/default/TopLevel.ts
index 56df2ba..f1e35fd 100644
--- a/base/typescript/test/inputs/json/priority/url.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/url.json/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/priority/uuids.json/default/TopLevel.ts b/head/typescript/test/inputs/json/priority/uuids.json/default/TopLevel.ts
index 450efa7..aa5c51e 100644
--- a/base/typescript/test/inputs/json/priority/uuids.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/priority/uuids.json/default/TopLevel.ts
@@ -101,10 +101,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.ts
index f045824..1e2d45e 100644
--- a/base/typescript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/bitcoin-block.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.ts
index 2c5c49a..b217a1b 100644
--- a/base/typescript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/copy-with-property.json/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/getting-started.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/getting-started.json/default/TopLevel.ts
index 68047d4..70b7eef 100644
--- a/base/typescript/test/inputs/json/samples/getting-started.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/getting-started.json/default/TopLevel.ts
@@ -97,10 +97,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/github-events.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/github-events.json/default/TopLevel.ts
index f9be8e3..d3767df 100644
--- a/base/typescript/test/inputs/json/samples/github-events.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/github-events.json/default/TopLevel.ts
@@ -382,10 +382,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.ts
index e3ddd80..68f69b5 100644
--- a/base/typescript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/kitchen-sink.json/default/TopLevel.ts
@@ -128,10 +128,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/null-safe.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/null-safe.json/default/TopLevel.ts
index acb9d31..806d27b 100644
--- a/base/typescript/test/inputs/json/samples/null-safe.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/null-safe.json/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.ts
index 1cfdd69..378c050 100644
--- a/base/typescript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/objc-control-characters.json/default/TopLevel.ts
@@ -100,10 +100,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/pokedex.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/pokedex.json/default/TopLevel.ts
index f442069..a170094 100644
--- a/base/typescript/test/inputs/json/samples/pokedex.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/pokedex.json/default/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/pokedex.json/prefer-types-true--df33e18681f9/TopLevel.ts b/head/typescript/test/inputs/json/samples/pokedex.json/prefer-types-true--df33e18681f9/TopLevel.ts
index 871aee4..a1bfc3f 100644
--- a/base/typescript/test/inputs/json/samples/pokedex.json/prefer-types-true--df33e18681f9/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/pokedex.json/prefer-types-true--df33e18681f9/TopLevel.ts
@@ -125,10 +125,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/reddit.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/reddit.json/default/TopLevel.ts
index 49a90d6..9024932 100644
--- a/base/typescript/test/inputs/json/samples/reddit.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/reddit.json/default/TopLevel.ts
@@ -222,10 +222,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/simple-object.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/simple-object.json/default/TopLevel.ts
index 73b065e..8b2550e 100644
--- a/base/typescript/test/inputs/json/samples/simple-object.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/simple-object.json/default/TopLevel.ts
@@ -98,10 +98,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/spotify-album.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/spotify-album.json/default/TopLevel.ts
index e1ac35d..9e9f733 100644
--- a/base/typescript/test/inputs/json/samples/spotify-album.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/spotify-album.json/default/TopLevel.ts
@@ -166,10 +166,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.ts
index 38eedf1..cda1ee3 100644
--- a/base/typescript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/us-avg-temperatures.json/default/TopLevel.ts
@@ -109,10 +109,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
diff --git a/base/typescript/test/inputs/json/samples/us-senators.json/default/TopLevel.ts b/head/typescript/test/inputs/json/samples/us-senators.json/default/TopLevel.ts
index dd9e267..85085e7 100644
--- a/base/typescript/test/inputs/json/samples/us-senators.json/default/TopLevel.ts
+++ b/head/typescript/test/inputs/json/samples/us-senators.json/default/TopLevel.ts
@@ -178,10 +178,15 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
         if (val === null) {
             return null;
         }
+        if (!(val instanceof Date) && (typeof val !== "string" || !/^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:[0-2][0-9]|3[01])(?:T(?:[01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](?:[.][0-9]+)?(?:Z|[+-](?:[01][0-9]|2[0-3]):[0-5][0-9]))?$/i.test(val)))
+            return invalidValue(l("Date"), val, key, parent);
         const d = new Date(val);
         if (isNaN(d.valueOf())) {
             return invalidValue(l("Date"), val, key, parent);
         }
+        const date = typeof val === "string" ? val.slice(0, 10) : null;
+        if (date !== null && new Date(date + "T00:00:00Z").toISOString().slice(0, 10) !== date)
+            return invalidValue(l("Date"), val, key, parent);
         return d;
     }
 
