diff --git a/base/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
index e4968d5..0a361ca 100644
--- a/base/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/minmaxlength.schema/default/quicktype.hpp
@@ -224,16 +224,19 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
-            intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 4, 5, std::nullopt),
+            empty_only_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, 0, std::nullopt),
+            intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 4, 5, std::string("^[a-z]+$")),
             maxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, 5, std::nullopt),
             minlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, std::nullopt, std::nullopt),
             min_max_intersection_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::nullopt),
-            minmaxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::nullopt),
-            union_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 6, std::nullopt)
+            minmaxlength_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 5, std::string("^[a-z]+$")),
+            union_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, 3, 6, std::string("^[a-z]+$"))
         {}
         virtual ~TopLevel() = default;
 
         private:
+        std::string empty_only;
+        ClassMemberConstraints empty_only_constraint;
         std::string intersection;
         ClassMemberConstraints intersection_constraint;
         InUnion in_union;
@@ -250,6 +253,10 @@ namespace quicktype {
         ClassMemberConstraints union_constraint;
 
         public:
+        const std::string & get_empty_only() const { return empty_only; }
+        std::string & get_mutable_empty_only() { return empty_only; }
+        void set_empty_only(const std::string & value) { CheckConstraint("empty_only", empty_only_constraint, value); this->empty_only = value; }
+
         const std::string & get_intersection() const { return intersection; }
         std::string & get_mutable_intersection() { return intersection; }
         void set_intersection(const std::string & value) { CheckConstraint("intersection", intersection_constraint, value); this->intersection = value; }
@@ -297,6 +304,7 @@ struct adl_serializer<std::variant<double, std::string>> {
 }
 namespace quicktype {
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_empty_only(j.at("emptyOnly").get<std::string>());
         x.set_intersection(j.at("intersection").get<std::string>());
         x.set_in_union(j.at("inUnion").get<InUnion>());
         x.set_maxlength(j.at("maxlength").get<std::string>());
@@ -309,6 +317,7 @@ namespace quicktype {
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["emptyOnly"] = x.get_empty_only();
         j["intersection"] = x.get_intersection();
         j["inUnion"] = x.get_in_union();
         j["maxlength"] = x.get_maxlength();
diff --git a/base/schema-cplusplus/test/inputs/schema/pattern.schema/default/quicktype.hpp b/head/schema-cplusplus/test/inputs/schema/pattern.schema/default/quicktype.hpp
index 2038ad3..80089d6 100644
--- a/base/schema-cplusplus/test/inputs/schema/pattern.schema/default/quicktype.hpp
+++ b/head/schema-cplusplus/test/inputs/schema/pattern.schema/default/quicktype.hpp
@@ -165,6 +165,7 @@ namespace quicktype {
     class TopLevel {
         public:
         TopLevel() :
+            escaped_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("^\\d+\\.[a-z]+$")),
             pattern1_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("a[.]*")),
             pattern2_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("b[.]*")),
             union_constraint(std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::nullopt, std::string("(b[.]*)|(c[.]*)"))
@@ -172,6 +173,8 @@ namespace quicktype {
         virtual ~TopLevel() = default;
 
         private:
+        std::string escaped;
+        ClassMemberConstraints escaped_constraint;
         std::string pattern1;
         ClassMemberConstraints pattern1_constraint;
         std::string pattern2;
@@ -180,6 +183,10 @@ namespace quicktype {
         ClassMemberConstraints union_constraint;
 
         public:
+        const std::string & get_escaped() const { return escaped; }
+        std::string & get_mutable_escaped() { return escaped; }
+        void set_escaped(const std::string & value) { CheckConstraint("escaped", escaped_constraint, value); this->escaped = value; }
+
         const std::string & get_pattern1() const { return pattern1; }
         std::string & get_mutable_pattern1() { return pattern1; }
         void set_pattern1(const std::string & value) { CheckConstraint("pattern1", pattern1_constraint, value); this->pattern1 = value; }
@@ -199,6 +206,7 @@ namespace quicktype {
     void to_json(json & j, const TopLevel & x);
 
     inline void from_json(const json & j, TopLevel& x) {
+        x.set_escaped(j.at("escaped").get<std::string>());
         x.set_pattern1(j.at("pattern1").get<std::string>());
         x.set_pattern2(j.at("pattern2").get<std::string>());
         x.set_top_level_union(j.at("union").get<std::string>());
@@ -206,6 +214,7 @@ namespace quicktype {
 
     inline void to_json(json & j, const TopLevel & x) {
         j = json::object();
+        j["escaped"] = x.get_escaped();
         j["pattern1"] = x.get_pattern1();
         j["pattern2"] = x.get_pattern2();
         j["union"] = x.get_top_level_union();
diff --git a/base/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
index c99cdcf..9401f32 100644
--- a/base/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
@@ -25,34 +25,38 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonProperty("emptyOnly", Required = Required.Always)]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string EmptyOnly { get; set; }
+
         [JsonProperty("intersection", Required = Required.Always)]
-        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
         public string Intersection { get; set; }
 
         [JsonProperty("inUnion", Required = Required.Always)]
         public InUnion InUnion { get; set; }
 
         [JsonProperty("maxlength", Required = Required.Always)]
-        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
         public string Maxlength { get; set; }
 
         [JsonProperty("minlength", Required = Required.Always)]
-        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndecentMinMaxLengthCheckConverter))]
         public string Minlength { get; set; }
 
         [JsonProperty("minMaxIntersection", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
         public string MinMaxIntersection { get; set; }
 
         [JsonProperty("minmaxlength", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
         public string Minmaxlength { get; set; }
 
         [JsonProperty("minMaxUnion", Required = Required.Always)]
         public string MinMaxUnion { get; set; }
 
         [JsonProperty("union", Required = Required.Always)]
-        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(HilariousMinMaxLengthCheckConverter))]
         public string Union { get; set; }
     }
 
@@ -89,6 +93,34 @@ namespace QuickType
         };
     }
 
+    internal class PurpleMinMaxLengthCheckConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            var value = serializer.Deserialize<string>(reader);
+            if (value.Length <= 0)
+            {
+                return value;
+            }
+            throw new Exception("Cannot unmarshal type string");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            var value = (string)untypedValue;
+            if (value.Length <= 0)
+            {
+                serializer.Serialize(writer, value);
+                return;
+            }
+            throw new Exception("Cannot marshal type string");
+        }
+
+        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+    }
+
     internal class InUnionConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(InUnion) || t == typeof(InUnion?);
@@ -135,7 +167,7 @@ namespace QuickType
         public static readonly InUnionConverter Singleton = new InUnionConverter();
     }
 
-    internal class PurpleMinMaxLengthCheckConverter : JsonConverter
+    internal class FluffyMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -160,10 +192,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
     }
 
-    internal class FluffyMinMaxLengthCheckConverter : JsonConverter
+    internal class TentacledMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -188,10 +220,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
+        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
     }
 
-    internal class TentacledMinMaxLengthCheckConverter : JsonConverter
+    internal class StickyMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -216,10 +248,38 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
+        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
     }
 
-    internal class StickyMinMaxLengthCheckConverter : JsonConverter
+    internal class IndigoMinMaxLengthCheckConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            var value = serializer.Deserialize<string>(reader);
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                return value;
+            }
+            throw new Exception("Cannot unmarshal type string");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            var value = (string)untypedValue;
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                serializer.Serialize(writer, value);
+                return;
+            }
+            throw new Exception("Cannot marshal type string");
+        }
+
+        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+    }
+
+    internal class IndecentMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -244,10 +304,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
+        public static readonly IndecentMinMaxLengthCheckConverter Singleton = new IndecentMinMaxLengthCheckConverter();
     }
 
-    internal class IndigoMinMaxLengthCheckConverter : JsonConverter
+    internal class HilariousMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -272,7 +332,7 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+        public static readonly HilariousMinMaxLengthCheckConverter Singleton = new HilariousMinMaxLengthCheckConverter();
     }
 }
 #pragma warning restore CS8618
diff --git a/base/schema-csharp/test/inputs/schema/pattern.schema/default/QuickType.cs b/head/schema-csharp/test/inputs/schema/pattern.schema/default/QuickType.cs
index 2d4c9f3..360c233 100644
--- a/base/schema-csharp/test/inputs/schema/pattern.schema/default/QuickType.cs
+++ b/head/schema-csharp/test/inputs/schema/pattern.schema/default/QuickType.cs
@@ -25,6 +25,9 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonProperty("escaped", Required = Required.Always)]
+        public string Escaped { get; set; }
+
         [JsonProperty("pattern1", Required = Required.Always)]
         public string Pattern1 { get; set; }
 
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
index c5b52c2..741c9ba 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
@@ -22,9 +22,14 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonRequired]
+        [JsonPropertyName("emptyOnly")]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string EmptyOnly { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("intersection")]
-        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
         public string Intersection { get; set; }
 
         [JsonRequired]
@@ -33,22 +38,22 @@ namespace QuickType
 
         [JsonRequired]
         [JsonPropertyName("maxlength")]
-        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
         public string Maxlength { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minlength")]
-        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndecentMinMaxLengthCheckConverter))]
         public string Minlength { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minMaxIntersection")]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
         public string MinMaxIntersection { get; set; }
 
         [JsonRequired]
         [JsonPropertyName("minmaxlength")]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
         public string Minmaxlength { get; set; }
 
         [JsonRequired]
@@ -57,7 +62,7 @@ namespace QuickType
 
         [JsonRequired]
         [JsonPropertyName("union")]
-        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(HilariousMinMaxLengthCheckConverter))]
         public string Union { get; set; }
     }
 
@@ -94,6 +99,33 @@ namespace QuickType
         };
     }
 
+    internal class PurpleMinMaxLengthCheckConverter : JsonConverter<string>
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+            var value = reader.GetString();
+            if (value.Length <= 0)
+            {
+                return value;
+            }
+            throw new JsonException("Cannot unmarshal type string");
+        }
+
+        public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
+        {
+            if (value.Length <= 0)
+            {
+                JsonSerializer.Serialize(writer, value, options);
+                return;
+            }
+            throw new NotSupportedException("Cannot marshal type string");
+        }
+
+        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+    }
+
     internal class InUnionConverter : JsonConverter<InUnion>
     {
         public override bool CanConvert(Type t) => t == typeof(InUnion);
@@ -137,7 +169,7 @@ namespace QuickType
         public static readonly InUnionConverter Singleton = new InUnionConverter();
     }
 
-    internal class PurpleMinMaxLengthCheckConverter : JsonConverter<string>
+    internal class FluffyMinMaxLengthCheckConverter : JsonConverter<string>
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -161,10 +193,10 @@ namespace QuickType
             throw new NotSupportedException("Cannot marshal type string");
         }
 
-        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
     }
 
-    internal class FluffyMinMaxLengthCheckConverter : JsonConverter<string>
+    internal class TentacledMinMaxLengthCheckConverter : JsonConverter<string>
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -188,10 +220,10 @@ namespace QuickType
             throw new NotSupportedException("Cannot marshal type string");
         }
 
-        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
+        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
     }
 
-    internal class TentacledMinMaxLengthCheckConverter : JsonConverter<string>
+    internal class StickyMinMaxLengthCheckConverter : JsonConverter<string>
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -215,10 +247,37 @@ namespace QuickType
             throw new NotSupportedException("Cannot marshal type string");
         }
 
-        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
+        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
     }
 
-    internal class StickyMinMaxLengthCheckConverter : JsonConverter<string>
+    internal class IndigoMinMaxLengthCheckConverter : JsonConverter<string>
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override string Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
+        {
+            var value = reader.GetString();
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                return value;
+            }
+            throw new JsonException("Cannot unmarshal type string");
+        }
+
+        public override void Write(Utf8JsonWriter writer, string value, JsonSerializerOptions options)
+        {
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                JsonSerializer.Serialize(writer, value, options);
+                return;
+            }
+            throw new NotSupportedException("Cannot marshal type string");
+        }
+
+        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+    }
+
+    internal class IndecentMinMaxLengthCheckConverter : JsonConverter<string>
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -242,10 +301,10 @@ namespace QuickType
             throw new NotSupportedException("Cannot marshal type string");
         }
 
-        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
+        public static readonly IndecentMinMaxLengthCheckConverter Singleton = new IndecentMinMaxLengthCheckConverter();
     }
 
-    internal class IndigoMinMaxLengthCheckConverter : JsonConverter<string>
+    internal class HilariousMinMaxLengthCheckConverter : JsonConverter<string>
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -269,7 +328,7 @@ namespace QuickType
             throw new NotSupportedException("Cannot marshal type string");
         }
 
-        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+        public static readonly HilariousMinMaxLengthCheckConverter Singleton = new HilariousMinMaxLengthCheckConverter();
     }
     
     public class DateOnlyConverter : JsonConverter<DateOnly>
diff --git a/base/schema-csharp-SystemTextJson/test/inputs/schema/pattern.schema/default/QuickType.cs b/head/schema-csharp-SystemTextJson/test/inputs/schema/pattern.schema/default/QuickType.cs
index e9dd59e..7c18efc 100644
--- a/base/schema-csharp-SystemTextJson/test/inputs/schema/pattern.schema/default/QuickType.cs
+++ b/head/schema-csharp-SystemTextJson/test/inputs/schema/pattern.schema/default/QuickType.cs
@@ -22,6 +22,10 @@ namespace QuickType
 
     public partial class TopLevel
     {
+        [JsonRequired]
+        [JsonPropertyName("escaped")]
+        public string Escaped { get; set; }
+
         [JsonRequired]
         [JsonPropertyName("pattern1")]
         public string Pattern1 { get; set; }
diff --git a/base/schema-csharp-records/test/inputs/schema/minmaxlength.schema/default/QuickType.cs b/head/schema-csharp-records/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
index 5e70500..8cd7feb 100644
--- a/base/schema-csharp-records/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
+++ b/head/schema-csharp-records/test/inputs/schema/minmaxlength.schema/default/QuickType.cs
@@ -25,34 +25,38 @@ namespace QuickType
 
     public partial record TopLevel
     {
+        [JsonProperty("emptyOnly", Required = Required.Always)]
+        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        public string EmptyOnly { get; set; }
+
         [JsonProperty("intersection", Required = Required.Always)]
-        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
         public string Intersection { get; set; }
 
         [JsonProperty("inUnion", Required = Required.Always)]
         public InUnion InUnion { get; set; }
 
         [JsonProperty("maxlength", Required = Required.Always)]
-        [JsonConverter(typeof(TentacledMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
         public string Maxlength { get; set; }
 
         [JsonProperty("minlength", Required = Required.Always)]
-        [JsonConverter(typeof(StickyMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndecentMinMaxLengthCheckConverter))]
         public string Minlength { get; set; }
 
         [JsonProperty("minMaxIntersection", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
         public string MinMaxIntersection { get; set; }
 
         [JsonProperty("minmaxlength", Required = Required.Always)]
-        [JsonConverter(typeof(PurpleMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(FluffyMinMaxLengthCheckConverter))]
         public string Minmaxlength { get; set; }
 
         [JsonProperty("minMaxUnion", Required = Required.Always)]
         public string MinMaxUnion { get; set; }
 
         [JsonProperty("union", Required = Required.Always)]
-        [JsonConverter(typeof(IndigoMinMaxLengthCheckConverter))]
+        [JsonConverter(typeof(HilariousMinMaxLengthCheckConverter))]
         public string Union { get; set; }
     }
 
@@ -89,6 +93,34 @@ namespace QuickType
         };
     }
 
+    internal class PurpleMinMaxLengthCheckConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            var value = serializer.Deserialize<string>(reader);
+            if (value.Length <= 0)
+            {
+                return value;
+            }
+            throw new Exception("Cannot unmarshal type string");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            var value = (string)untypedValue;
+            if (value.Length <= 0)
+            {
+                serializer.Serialize(writer, value);
+                return;
+            }
+            throw new Exception("Cannot marshal type string");
+        }
+
+        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+    }
+
     internal class InUnionConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(InUnion) || t == typeof(InUnion?);
@@ -135,7 +167,7 @@ namespace QuickType
         public static readonly InUnionConverter Singleton = new InUnionConverter();
     }
 
-    internal class PurpleMinMaxLengthCheckConverter : JsonConverter
+    internal class FluffyMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -160,10 +192,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly PurpleMinMaxLengthCheckConverter Singleton = new PurpleMinMaxLengthCheckConverter();
+        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
     }
 
-    internal class FluffyMinMaxLengthCheckConverter : JsonConverter
+    internal class TentacledMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -188,10 +220,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly FluffyMinMaxLengthCheckConverter Singleton = new FluffyMinMaxLengthCheckConverter();
+        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
     }
 
-    internal class TentacledMinMaxLengthCheckConverter : JsonConverter
+    internal class StickyMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -216,10 +248,38 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly TentacledMinMaxLengthCheckConverter Singleton = new TentacledMinMaxLengthCheckConverter();
+        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
     }
 
-    internal class StickyMinMaxLengthCheckConverter : JsonConverter
+    internal class IndigoMinMaxLengthCheckConverter : JsonConverter
+    {
+        public override bool CanConvert(Type t) => t == typeof(string);
+
+        public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
+        {
+            var value = serializer.Deserialize<string>(reader);
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                return value;
+            }
+            throw new Exception("Cannot unmarshal type string");
+        }
+
+        public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
+        {
+            var value = (string)untypedValue;
+            if (value.Length >= 3 && value.Length <= 5)
+            {
+                serializer.Serialize(writer, value);
+                return;
+            }
+            throw new Exception("Cannot marshal type string");
+        }
+
+        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+    }
+
+    internal class IndecentMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -244,10 +304,10 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly StickyMinMaxLengthCheckConverter Singleton = new StickyMinMaxLengthCheckConverter();
+        public static readonly IndecentMinMaxLengthCheckConverter Singleton = new IndecentMinMaxLengthCheckConverter();
     }
 
-    internal class IndigoMinMaxLengthCheckConverter : JsonConverter
+    internal class HilariousMinMaxLengthCheckConverter : JsonConverter
     {
         public override bool CanConvert(Type t) => t == typeof(string);
 
@@ -272,7 +332,7 @@ namespace QuickType
             throw new Exception("Cannot marshal type string");
         }
 
-        public static readonly IndigoMinMaxLengthCheckConverter Singleton = new IndigoMinMaxLengthCheckConverter();
+        public static readonly HilariousMinMaxLengthCheckConverter Singleton = new HilariousMinMaxLengthCheckConverter();
     }
 }
 #pragma warning restore CS8618
diff --git a/base/schema-csharp-records/test/inputs/schema/pattern.schema/default/QuickType.cs b/head/schema-csharp-records/test/inputs/schema/pattern.schema/default/QuickType.cs
index 2f8ac46..0e083c6 100644
--- a/base/schema-csharp-records/test/inputs/schema/pattern.schema/default/QuickType.cs
+++ b/head/schema-csharp-records/test/inputs/schema/pattern.schema/default/QuickType.cs
@@ -25,6 +25,9 @@ namespace QuickType
 
     public partial record TopLevel
     {
+        [JsonProperty("escaped", Required = Required.Always)]
+        public string Escaped { get; set; }
+
         [JsonProperty("pattern1", Required = Required.Always)]
         public string Pattern1 { get; set; }
 
diff --git a/base/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
index 9d838bc..b05618d 100644
--- a/base/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/minmaxlength.schema/default/TopLevel.dart
@@ -9,6 +9,7 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
+    final String emptyOnly;
     final String intersection;
     final dynamic inUnion;
     final String maxlength;
@@ -19,6 +20,7 @@ class TopLevel {
     final String union;
 
     TopLevel({
+        required this.emptyOnly,
         required this.intersection,
         required this.inUnion,
         required this.maxlength,
@@ -30,6 +32,7 @@ class TopLevel {
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        emptyOnly: json["emptyOnly"],
         intersection: json["intersection"],
         inUnion: json["inUnion"],
         maxlength: json["maxlength"],
@@ -41,6 +44,7 @@ class TopLevel {
     );
 
     Map<String, dynamic> toJson() => {
+        "emptyOnly": emptyOnly,
         "intersection": intersection,
         "inUnion": inUnion,
         "maxlength": maxlength,
diff --git a/base/schema-dart/test/inputs/schema/pattern.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/pattern.schema/default/TopLevel.dart
index 8083651..6a2074c 100644
--- a/base/schema-dart/test/inputs/schema/pattern.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/pattern.schema/default/TopLevel.dart
@@ -9,23 +9,27 @@ TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
 String topLevelToJson(TopLevel data) => json.encode(data.toJson());
 
 class TopLevel {
+    final String escaped;
     final String pattern1;
     final String pattern2;
     final String union;
 
     TopLevel({
+        required this.escaped,
         required this.pattern1,
         required this.pattern2,
         required this.union,
     });
 
     factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        escaped: json["escaped"],
         pattern1: json["pattern1"],
         pattern2: json["pattern2"],
         union: json["union"],
     );
 
     Map<String, dynamic> toJson() => {
+        "escaped": escaped,
         "pattern1": pattern1,
         "pattern2": pattern2,
         "union": union,
diff --git a/base/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
index 31656f4..07e0601 100644
--- a/base/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/minmaxlength.schema/default/QuickType.ex
@@ -6,10 +6,11 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
-  defstruct [:intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
+  @enforce_keys [:empty_only, :intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
+  defstruct [:empty_only, :intersection, :in_union, :maxlength, :minlength, :min_max_intersection, :minmaxlength, :min_max_union, :union]
 
   @type t :: %__MODULE__{
+          empty_only: String.t(),
           intersection: String.t(),
           in_union: float() | String.t(),
           maxlength: String.t(),
@@ -22,6 +23,7 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
+      empty_only: m["emptyOnly"],
       intersection: m["intersection"],
       in_union: m["inUnion"],
       maxlength: m["maxlength"],
@@ -41,6 +43,7 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "emptyOnly" => struct.empty_only,
       "intersection" => struct.intersection,
       "inUnion" => struct.in_union,
       "maxlength" => struct.maxlength,
diff --git a/base/schema-elixir/test/inputs/schema/pattern.schema/default/QuickType.ex b/head/schema-elixir/test/inputs/schema/pattern.schema/default/QuickType.ex
index a077de8..0f20e6a 100644
--- a/base/schema-elixir/test/inputs/schema/pattern.schema/default/QuickType.ex
+++ b/head/schema-elixir/test/inputs/schema/pattern.schema/default/QuickType.ex
@@ -6,10 +6,11 @@
 # Encode into a JSON string: TopLevel.to_json(struct)
 
 defmodule TopLevel do
-  @enforce_keys [:pattern1, :pattern2, :union]
-  defstruct [:pattern1, :pattern2, :union]
+  @enforce_keys [:escaped, :pattern1, :pattern2, :union]
+  defstruct [:escaped, :pattern1, :pattern2, :union]
 
   @type t :: %__MODULE__{
+          escaped: String.t(),
           pattern1: String.t(),
           pattern2: String.t(),
           union: String.t()
@@ -17,6 +18,7 @@ defmodule TopLevel do
 
   def from_map(m) do
     %TopLevel{
+      escaped: m["escaped"],
       pattern1: m["pattern1"],
       pattern2: m["pattern2"],
       union: m["union"],
@@ -31,6 +33,7 @@ defmodule TopLevel do
 
   def to_map(struct) do
     %{
+      "escaped" => struct.escaped,
       "pattern1" => struct.pattern1,
       "pattern2" => struct.pattern2,
       "union" => struct.union,
diff --git a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
index 725e5bd..9f8777d 100644
--- a/base/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/minmaxlength.schema/default/QuickType.elm
@@ -24,7 +24,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { intersection : String
+    { emptyOnly : String
+    , intersection : String
     , inUnion : InUnion
     , maxlength : String
     , minlength : String
@@ -46,6 +47,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "emptyOnly" Jdec.string
         |> Jpipe.required "intersection" Jdec.string
         |> Jpipe.required "inUnion" inUnion
         |> Jpipe.required "maxlength" Jdec.string
@@ -58,7 +60,8 @@ quickType =
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("intersection", Jenc.string x.intersection)
+        [ ("emptyOnly", Jenc.string x.emptyOnly)
+        , ("intersection", Jenc.string x.intersection)
         , ("inUnion", encodeInUnion x.inUnion)
         , ("maxlength", Jenc.string x.maxlength)
         , ("minlength", Jenc.string x.minlength)
diff --git a/base/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm b/head/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
index d026f09..b0827b0 100644
--- a/base/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
+++ b/head/schema-elm/test/inputs/schema/pattern.schema/default/QuickType.elm
@@ -23,7 +23,8 @@ import Json.Encode as Jenc
 import Dict exposing (Dict)
 
 type alias QuickType =
-    { pattern1 : String
+    { escaped : String
+    , pattern1 : String
     , pattern2 : String
     , union : String
     }
@@ -36,6 +37,7 @@ quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
 quickType : Jdec.Decoder QuickType
 quickType =
     Jdec.succeed QuickType
+        |> Jpipe.required "escaped" Jdec.string
         |> Jpipe.required "pattern1" Jdec.string
         |> Jpipe.required "pattern2" Jdec.string
         |> Jpipe.required "union" Jdec.string
@@ -43,7 +45,8 @@ quickType =
 encodeQuickType : QuickType -> Jenc.Value
 encodeQuickType x =
     Jenc.object
-        [ ("pattern1", Jenc.string x.pattern1)
+        [ ("escaped", Jenc.string x.escaped)
+        , ("pattern1", Jenc.string x.pattern1)
         , ("pattern2", Jenc.string x.pattern2)
         , ("union", Jenc.string x.union)
         ]
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 0e076f8..f3dece0 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
@@ -10,6 +10,7 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    emptyOnly:          string;
     intersection:       string;
     inUnion:            InUnion;
     maxlength:          string;
@@ -188,6 +189,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "emptyOnly", js: "emptyOnly", typ: "" },
         { json: "intersection", js: "intersection", typ: "" },
         { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
         { json: "maxlength", js: "maxlength", typ: "" },
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 6fefb6d..cd45a5f 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
@@ -10,6 +10,7 @@
 // match the expected interface, even if the JSON is valid.
 
 export type TopLevel = {
+    escaped:  string;
     pattern1: string;
     pattern2: string;
     union:    string;
@@ -181,6 +182,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "escaped", js: "escaped", typ: "" },
         { json: "pattern1", js: "pattern1", typ: "" },
         { json: "pattern2", js: "pattern2", typ: "" },
         { json: "union", js: "union", typ: "" },
diff --git a/base/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
index f5f4367..38ba61e 100644
--- a/base/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/minmaxlength.schema/default/quicktype.go
@@ -22,6 +22,7 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	EmptyOnly          string   `json:"emptyOnly"`
 	Intersection       string   `json:"intersection"`
 	InUnion            *InUnion `json:"inUnion"`
 	Maxlength          string   `json:"maxlength"`
diff --git a/base/schema-golang/test/inputs/schema/pattern.schema/default/quicktype.go b/head/schema-golang/test/inputs/schema/pattern.schema/default/quicktype.go
index ce4032b..a4f356e 100644
--- a/base/schema-golang/test/inputs/schema/pattern.schema/default/quicktype.go
+++ b/head/schema-golang/test/inputs/schema/pattern.schema/default/quicktype.go
@@ -19,6 +19,7 @@ func (r *TopLevel) Marshal() ([]byte, error) {
 }
 
 type TopLevel struct {
+	Escaped  string `json:"escaped"`
 	Pattern1 string `json:"pattern1"`
 	Pattern2 string `json:"pattern2"`
 	Union    string `json:"union"`
diff --git a/base/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
index 123ae8c..0ad1fb0 100644
--- a/base/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/minmaxlength.schema/default/QuickType.hs
@@ -14,7 +14,8 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { intersectionQuickType :: Text
+    { emptyOnlyQuickType :: Text
+    , intersectionQuickType :: Text
     , inUnionQuickType :: InUnion
     , maxlengthQuickType :: Text
     , minlengthQuickType :: Text
@@ -33,9 +34,10 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType intersectionQuickType inUnionQuickType maxlengthQuickType minlengthQuickType minMaxIntersectionQuickType minmaxlengthQuickType minMaxUnionQuickType unionQuickType) =
+    toJSON (QuickType emptyOnlyQuickType intersectionQuickType inUnionQuickType maxlengthQuickType minlengthQuickType minMaxIntersectionQuickType minmaxlengthQuickType minMaxUnionQuickType unionQuickType) =
         object
-        [ "intersection" .= intersectionQuickType
+        [ "emptyOnly" .= emptyOnlyQuickType
+        , "intersection" .= intersectionQuickType
         , "inUnion" .= inUnionQuickType
         , "maxlength" .= maxlengthQuickType
         , "minlength" .= minlengthQuickType
@@ -47,7 +49,8 @@ instance ToJSON QuickType where
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "intersection"
+        <$> v .: "emptyOnly"
+        <*> v .: "intersection"
         <*> v .: "inUnion"
         <*> v .: "maxlength"
         <*> v .: "minlength"
diff --git a/base/schema-haskell/test/inputs/schema/pattern.schema/default/QuickType.hs b/head/schema-haskell/test/inputs/schema/pattern.schema/default/QuickType.hs
index 8c1a5d3..68f371f 100644
--- a/base/schema-haskell/test/inputs/schema/pattern.schema/default/QuickType.hs
+++ b/head/schema-haskell/test/inputs/schema/pattern.schema/default/QuickType.hs
@@ -13,7 +13,8 @@ import Data.HashMap.Strict (HashMap)
 import Data.Text (Text)
 
 data QuickType = QuickType
-    { pattern1QuickType :: Text
+    { escapedQuickType :: Text
+    , pattern1QuickType :: Text
     , pattern2QuickType :: Text
     , unionQuickType :: Text
     } deriving (Show)
@@ -22,15 +23,17 @@ decodeTopLevel :: ByteString -> Maybe QuickType
 decodeTopLevel = decode
 
 instance ToJSON QuickType where
-    toJSON (QuickType pattern1QuickType pattern2QuickType unionQuickType) =
+    toJSON (QuickType escapedQuickType pattern1QuickType pattern2QuickType unionQuickType) =
         object
-        [ "pattern1" .= pattern1QuickType
+        [ "escaped" .= escapedQuickType
+        , "pattern1" .= pattern1QuickType
         , "pattern2" .= pattern2QuickType
         , "union" .= unionQuickType
         ]
 
 instance FromJSON QuickType where
     parseJSON (Object v) = QuickType
-        <$> v .: "pattern1"
+        <$> v .: "escaped"
+        <*> v .: "pattern1"
         <*> v .: "pattern2"
         <*> v .: "union"
diff --git a/base/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..876e39a 100644
--- a/base/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,6 +3,7 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String emptyOnly;
     private String intersection;
     private InUnion inUnion;
     private String maxlength;
@@ -12,6 +13,11 @@ public class TopLevel {
     private String minMaxUnion;
     private String union;
 
+    @JsonProperty("emptyOnly")
+    public String getEmptyOnly() { return emptyOnly; }
+    @JsonProperty("emptyOnly")
+    public void setEmptyOnly(String value) { this.emptyOnly = value; }
+
     @JsonProperty("intersection")
     public String getIntersection() { return intersection; }
     @JsonProperty("intersection")
diff --git a/base/schema-java/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
index b22a985..4bcb2e3 100644
--- a/base/schema-java/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,10 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String escaped;
     private String pattern1;
     private String pattern2;
     private String union;
 
+    @JsonProperty("escaped")
+    public String getEscaped() { return escaped; }
+    @JsonProperty("escaped")
+    public void setEscaped(String value) { this.escaped = value; }
+
     @JsonProperty("pattern1")
     public String getPattern1() { return pattern1; }
     @JsonProperty("pattern1")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..876e39a 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,6 +3,7 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String emptyOnly;
     private String intersection;
     private InUnion inUnion;
     private String maxlength;
@@ -12,6 +13,11 @@ public class TopLevel {
     private String minMaxUnion;
     private String union;
 
+    @JsonProperty("emptyOnly")
+    public String getEmptyOnly() { return emptyOnly; }
+    @JsonProperty("emptyOnly")
+    public void setEmptyOnly(String value) { this.emptyOnly = value; }
+
     @JsonProperty("intersection")
     public String getIntersection() { return intersection; }
     @JsonProperty("intersection")
diff --git a/base/schema-java-datetime-legacy/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-datetime-legacy/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
index b22a985..4bcb2e3 100644
--- a/base/schema-java-datetime-legacy/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-datetime-legacy/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,10 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String escaped;
     private String pattern1;
     private String pattern2;
     private String union;
 
+    @JsonProperty("escaped")
+    public String getEscaped() { return escaped; }
+    @JsonProperty("escaped")
+    public void setEscaped(String value) { this.escaped = value; }
+
     @JsonProperty("pattern1")
     public String getPattern1() { return pattern1; }
     @JsonProperty("pattern1")
diff --git a/base/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
index 98d223e..876e39a 100644
--- a/base/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/minmaxlength.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,6 +3,7 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String emptyOnly;
     private String intersection;
     private InUnion inUnion;
     private String maxlength;
@@ -12,6 +13,11 @@ public class TopLevel {
     private String minMaxUnion;
     private String union;
 
+    @JsonProperty("emptyOnly")
+    public String getEmptyOnly() { return emptyOnly; }
+    @JsonProperty("emptyOnly")
+    public void setEmptyOnly(String value) { this.emptyOnly = value; }
+
     @JsonProperty("intersection")
     public String getIntersection() { return intersection; }
     @JsonProperty("intersection")
diff --git a/base/schema-java-lombok/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java b/head/schema-java-lombok/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
index b22a985..4bcb2e3 100644
--- a/base/schema-java-lombok/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
+++ b/head/schema-java-lombok/test/inputs/schema/pattern.schema/default/src/main/java/io/quicktype/TopLevel.java
@@ -3,10 +3,16 @@ package io.quicktype;
 import com.fasterxml.jackson.annotation.*;
 
 public class TopLevel {
+    private String escaped;
     private String pattern1;
     private String pattern2;
     private String union;
 
+    @JsonProperty("escaped")
+    public String getEscaped() { return escaped; }
+    @JsonProperty("escaped")
+    public void setEscaped(String value) { this.escaped = value; }
+
     @JsonProperty("pattern1")
     public String getPattern1() { return pattern1; }
     @JsonProperty("pattern1")
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 5a56424..bc531c5 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
@@ -172,6 +172,7 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "emptyOnly", js: "emptyOnly", typ: "" },
         { json: "intersection", js: "intersection", typ: "" },
         { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
         { json: "maxlength", js: "maxlength", typ: "" },
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 f189725..4b489fb 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
@@ -172,6 +172,7 @@ function r(name) {
 
 const typeMap = {
     "TopLevel": o([
+        { json: "escaped", js: "escaped", typ: "" },
         { json: "pattern1", js: "pattern1", typ: "" },
         { json: "pattern2", js: "pattern2", typ: "" },
         { json: "union", js: "union", typ: "" },
diff --git a/base/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
index b6cabeb..6159329 100644
--- a/base/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
@@ -18,6 +18,7 @@ private val klaxon = Klaxon()
     .convert(InUnion::class, { InUnion.fromJson(it) }, { it.toJson() }, true)
 
 data class TopLevel (
+    val emptyOnly: String,
     val intersection: String,
     val inUnion: InUnion,
     val maxlength: String,
diff --git a/base/schema-kotlin/test/inputs/schema/pattern.schema/default/TopLevel.kt b/head/schema-kotlin/test/inputs/schema/pattern.schema/default/TopLevel.kt
index 37059af..0fd1615 100644
--- a/base/schema-kotlin/test/inputs/schema/pattern.schema/default/TopLevel.kt
+++ b/head/schema-kotlin/test/inputs/schema/pattern.schema/default/TopLevel.kt
@@ -9,6 +9,7 @@ import com.beust.klaxon.*
 private val klaxon = Klaxon()
 
 data class TopLevel (
+    val escaped: String,
     val pattern1: String,
     val pattern2: String,
     val union: String
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
index 1bad4ec..42f4869 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/minmaxlength.schema/default/TopLevel.kt
@@ -31,6 +31,9 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val emptyOnly: String,
+
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val intersection: String,
 
diff --git a/base/schema-kotlin-jackson/test/inputs/schema/pattern.schema/default/TopLevel.kt b/head/schema-kotlin-jackson/test/inputs/schema/pattern.schema/default/TopLevel.kt
index 4d23433..ebc2698 100644
--- a/base/schema-kotlin-jackson/test/inputs/schema/pattern.schema/default/TopLevel.kt
+++ b/head/schema-kotlin-jackson/test/inputs/schema/pattern.schema/default/TopLevel.kt
@@ -19,6 +19,9 @@ val mapper = jacksonObjectMapper().apply {
 }
 
 data class TopLevel (
+    @get:JsonProperty(required=true)@field:JsonProperty(required=true)
+    val escaped: String,
+
     @get:JsonProperty(required=true)@field:JsonProperty(required=true)
     val pattern1: String,
 
diff --git a/base/schema-kotlinx/test/inputs/schema/pattern.schema/default/TopLevel.kt b/head/schema-kotlinx/test/inputs/schema/pattern.schema/default/TopLevel.kt
index e4e65ce..b8dec2d 100644
--- a/base/schema-kotlinx/test/inputs/schema/pattern.schema/default/TopLevel.kt
+++ b/head/schema-kotlinx/test/inputs/schema/pattern.schema/default/TopLevel.kt
@@ -12,6 +12,7 @@ import kotlinx.serialization.encoding.*
 
 @Serializable
 data class TopLevel (
+    val escaped: String,
     val pattern1: String,
     val pattern2: String,
     val union: String
diff --git a/base/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
index a20e0ae..79f40ef 100644
--- a/base/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/minmaxlength.schema/default/TopLevel.php
@@ -4,6 +4,7 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private string $emptyOnly; // json:emptyOnly Required
     private string $intersection; // json:intersection Required
     private float|string $inUnion; // json:inUnion Required
     private string $maxlength; // json:maxlength Required
@@ -14,6 +15,7 @@ class TopLevel {
     private string $union; // json:union Required
 
     /**
+     * @param string $emptyOnly
      * @param string $intersection
      * @param float|string $inUnion
      * @param string $maxlength
@@ -23,7 +25,8 @@ class TopLevel {
      * @param string $minMaxUnion
      * @param string $union
      */
-    public function __construct(string $intersection, float|string $inUnion, string $maxlength, string $minlength, string $minMaxIntersection, string $minmaxlength, string $minMaxUnion, string $union) {
+    public function __construct(string $emptyOnly, string $intersection, float|string $inUnion, string $maxlength, string $minlength, string $minMaxIntersection, string $minmaxlength, string $minMaxUnion, string $union) {
+        $this->emptyOnly = $emptyOnly;
         $this->intersection = $intersection;
         $this->inUnion = $inUnion;
         $this->maxlength = $maxlength;
@@ -34,6 +37,53 @@ class TopLevel {
         $this->union = $union;
     }
 
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromEmptyOnly(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toEmptyOnly(): string {
+        if (TopLevel::validateEmptyOnly($this->emptyOnly))  {
+            return $this->emptyOnly; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::emptyOnly');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateEmptyOnly(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getEmptyOnly(): string {
+        if (TopLevel::validateEmptyOnly($this->emptyOnly))  {
+            return $this->emptyOnly;
+        }
+        throw new Exception('never get to getEmptyOnly TopLevel::emptyOnly');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleEmptyOnly(): string {
+        return 'TopLevel::emptyOnly::31'; /*31:emptyOnly*/
+    }
+
     /**
      * @param string $value
      * @throws Exception
@@ -78,7 +128,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleIntersection(): string {
-        return 'TopLevel::intersection::31'; /*31:intersection*/
+        return 'TopLevel::intersection::32'; /*32:intersection*/
     }
 
     /**
@@ -148,7 +198,7 @@ class TopLevel {
      * @return float|string
      */
     public static function sampleInUnion(): float|string {
-        return 32.032; /*32:inUnion*/
+        return 33.033; /*33:inUnion*/
     }
 
     /**
@@ -195,7 +245,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleMaxlength(): string {
-        return 'TopLevel::maxlength::33'; /*33:maxlength*/
+        return 'TopLevel::maxlength::34'; /*34:maxlength*/
     }
 
     /**
@@ -242,7 +292,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleMinlength(): string {
-        return 'TopLevel::minlength::34'; /*34:minlength*/
+        return 'TopLevel::minlength::35'; /*35:minlength*/
     }
 
     /**
@@ -289,7 +339,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleMinMaxIntersection(): string {
-        return 'TopLevel::minMaxIntersection::35'; /*35:minMaxIntersection*/
+        return 'TopLevel::minMaxIntersection::36'; /*36:minMaxIntersection*/
     }
 
     /**
@@ -336,7 +386,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleMinmaxlength(): string {
-        return 'TopLevel::minmaxlength::36'; /*36:minmaxlength*/
+        return 'TopLevel::minmaxlength::37'; /*37:minmaxlength*/
     }
 
     /**
@@ -383,7 +433,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleMinMaxUnion(): string {
-        return 'TopLevel::minMaxUnion::37'; /*37:minMaxUnion*/
+        return 'TopLevel::minMaxUnion::38'; /*38:minMaxUnion*/
     }
 
     /**
@@ -430,7 +480,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleUnion(): string {
-        return 'TopLevel::union::38'; /*38:union*/
+        return 'TopLevel::union::39'; /*39:union*/
     }
 
     /**
@@ -438,7 +488,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validateIntersection($this->intersection)
+        return TopLevel::validateEmptyOnly($this->emptyOnly)
+        || TopLevel::validateIntersection($this->intersection)
         || TopLevel::validateInUnion($this->inUnion)
         || TopLevel::validateMaxlength($this->maxlength)
         || TopLevel::validateMinlength($this->minlength)
@@ -454,6 +505,7 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'emptyOnly'} = $this->toEmptyOnly();
         $out->{'intersection'} = $this->toIntersection();
         $out->{'inUnion'} = $this->toInUnion();
         $out->{'maxlength'} = $this->toMaxlength();
@@ -472,7 +524,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromIntersection($obj->{'intersection'})
+         TopLevel::fromEmptyOnly($obj->{'emptyOnly'})
+        ,TopLevel::fromIntersection($obj->{'intersection'})
         ,TopLevel::fromInUnion($obj->{'inUnion'})
         ,TopLevel::fromMaxlength($obj->{'maxlength'})
         ,TopLevel::fromMinlength($obj->{'minlength'})
@@ -488,7 +541,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::sampleIntersection()
+         TopLevel::sampleEmptyOnly()
+        ,TopLevel::sampleIntersection()
         ,TopLevel::sampleInUnion()
         ,TopLevel::sampleMaxlength()
         ,TopLevel::sampleMinlength()
diff --git a/base/schema-php/test/inputs/schema/pattern.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/pattern.schema/default/TopLevel.php
index 8d3bae8..b651258 100644
--- a/base/schema-php/test/inputs/schema/pattern.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/pattern.schema/default/TopLevel.php
@@ -4,21 +4,71 @@ declare(strict_types=1);
 // This is an autogenerated file:TopLevel
 
 class TopLevel {
+    private string $escaped; // json:escaped Required
     private string $pattern1; // json:pattern1 Required
     private string $pattern2; // json:pattern2 Required
     private string $union; // json:union Required
 
     /**
+     * @param string $escaped
      * @param string $pattern1
      * @param string $pattern2
      * @param string $union
      */
-    public function __construct(string $pattern1, string $pattern2, string $union) {
+    public function __construct(string $escaped, string $pattern1, string $pattern2, string $union) {
+        $this->escaped = $escaped;
         $this->pattern1 = $pattern1;
         $this->pattern2 = $pattern2;
         $this->union = $union;
     }
 
+    /**
+     * @param string $value
+     * @throws Exception
+     * @return string
+     */
+    public static function fromEscaped(string $value): string {
+        return $value; /*string*/
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function toEscaped(): string {
+        if (TopLevel::validateEscaped($this->escaped))  {
+            return $this->escaped; /*string*/
+        }
+        throw new Exception('never get to this TopLevel::escaped');
+    }
+
+    /**
+     * @param string
+     * @return bool
+     * @throws Exception
+     */
+    public static function validateEscaped(string $value): bool {
+        return true;
+    }
+
+    /**
+     * @throws Exception
+     * @return string
+     */
+    public function getEscaped(): string {
+        if (TopLevel::validateEscaped($this->escaped))  {
+            return $this->escaped;
+        }
+        throw new Exception('never get to getEscaped TopLevel::escaped');
+    }
+
+    /**
+     * @return string
+     */
+    public static function sampleEscaped(): string {
+        return 'TopLevel::escaped::31'; /*31:escaped*/
+    }
+
     /**
      * @param string $value
      * @throws Exception
@@ -63,7 +113,7 @@ class TopLevel {
      * @return string
      */
     public static function samplePattern1(): string {
-        return 'TopLevel::pattern1::31'; /*31:pattern1*/
+        return 'TopLevel::pattern1::32'; /*32:pattern1*/
     }
 
     /**
@@ -110,7 +160,7 @@ class TopLevel {
      * @return string
      */
     public static function samplePattern2(): string {
-        return 'TopLevel::pattern2::32'; /*32:pattern2*/
+        return 'TopLevel::pattern2::33'; /*33:pattern2*/
     }
 
     /**
@@ -157,7 +207,7 @@ class TopLevel {
      * @return string
      */
     public static function sampleUnion(): string {
-        return 'TopLevel::union::33'; /*33:union*/
+        return 'TopLevel::union::34'; /*34:union*/
     }
 
     /**
@@ -165,7 +215,8 @@ class TopLevel {
      * @return bool
      */
     public function validate(): bool {
-        return TopLevel::validatePattern1($this->pattern1)
+        return TopLevel::validateEscaped($this->escaped)
+        || TopLevel::validatePattern1($this->pattern1)
         || TopLevel::validatePattern2($this->pattern2)
         || TopLevel::validateUnion($this->union);
     }
@@ -176,6 +227,7 @@ class TopLevel {
      */
     public function to(): stdClass  {
         $out = new stdClass();
+        $out->{'escaped'} = $this->toEscaped();
         $out->{'pattern1'} = $this->toPattern1();
         $out->{'pattern2'} = $this->toPattern2();
         $out->{'union'} = $this->toUnion();
@@ -189,7 +241,8 @@ class TopLevel {
      */
     public static function from(stdClass $obj): TopLevel {
         return new TopLevel(
-         TopLevel::fromPattern1($obj->{'pattern1'})
+         TopLevel::fromEscaped($obj->{'escaped'})
+        ,TopLevel::fromPattern1($obj->{'pattern1'})
         ,TopLevel::fromPattern2($obj->{'pattern2'})
         ,TopLevel::fromUnion($obj->{'union'})
         );
@@ -200,7 +253,8 @@ class TopLevel {
      */
     public static function sample(): TopLevel {
         return new TopLevel(
-         TopLevel::samplePattern1()
+         TopLevel::sampleEscaped()
+        ,TopLevel::samplePattern1()
         ,TopLevel::samplePattern2()
         ,TopLevel::sampleUnion()
         );
diff --git a/base/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
index a60cbb5..ae4f342 100644
--- a/base/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/minmaxlength.schema/default/TopLevel.pmod
@@ -13,6 +13,7 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    string  empty_only;           // json: "emptyOnly"
     string  intersection;         // json: "intersection"
     InUnion in_union;             // json: "inUnion"
     string  maxlength;            // json: "maxlength"
@@ -24,6 +25,7 @@ class TopLevel {
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "emptyOnly" : empty_only,
             "intersection" : intersection,
             "inUnion" : in_union,
             "maxlength" : maxlength,
@@ -41,6 +43,7 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.empty_only = json["emptyOnly"];
     retval.intersection = json["intersection"];
     retval.in_union = json["inUnion"];
     retval.maxlength = json["maxlength"];
diff --git a/base/schema-pike/test/inputs/schema/pattern.schema/default/TopLevel.pmod b/head/schema-pike/test/inputs/schema/pattern.schema/default/TopLevel.pmod
index fec5183..2155689 100644
--- a/base/schema-pike/test/inputs/schema/pattern.schema/default/TopLevel.pmod
+++ b/head/schema-pike/test/inputs/schema/pattern.schema/default/TopLevel.pmod
@@ -13,12 +13,14 @@
 // match the expected interface, even if the JSON itself is valid.
 
 class TopLevel {
+    string escaped;  // json: "escaped"
     string pattern1; // json: "pattern1"
     string pattern2; // json: "pattern2"
     string union;    // json: "union"
 
     string encode_json() {
         mapping(string:mixed) json = ([
+            "escaped" : escaped,
             "pattern1" : pattern1,
             "pattern2" : pattern2,
             "union" : union,
@@ -31,6 +33,7 @@ class TopLevel {
 TopLevel TopLevel_from_JSON(mixed json) {
     TopLevel retval = TopLevel();
 
+    retval.escaped = json["escaped"];
     retval.pattern1 = json["pattern1"];
     retval.pattern2 = json["pattern2"];
     retval.union = json["union"];
diff --git a/base/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
index 1ad7ca0..fd07444 100644
--- a/base/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/minmaxlength.schema/default/quicktype.py
@@ -36,6 +36,7 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
+    empty_only: str
     intersection: str
     in_union: float | str
     maxlength: str
@@ -48,6 +49,7 @@ class TopLevel:
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        empty_only = from_str(obj.get("emptyOnly"))
         intersection = from_str(obj.get("intersection"))
         in_union = from_union([from_float, from_str], obj.get("inUnion"))
         maxlength = from_str(obj.get("maxlength"))
@@ -56,10 +58,11 @@ class TopLevel:
         minmaxlength = from_str(obj.get("minmaxlength"))
         min_max_union = from_str(obj.get("minMaxUnion"))
         union = from_str(obj.get("union"))
-        return TopLevel(intersection, in_union, maxlength, minlength, min_max_intersection, minmaxlength, min_max_union, union)
+        return TopLevel(empty_only, intersection, in_union, maxlength, minlength, min_max_intersection, minmaxlength, min_max_union, union)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["emptyOnly"] = from_str(self.empty_only)
         result["intersection"] = from_str(self.intersection)
         result["inUnion"] = from_union([to_float, from_str], self.in_union)
         result["maxlength"] = from_str(self.maxlength)
diff --git a/base/schema-python/test/inputs/schema/pattern.schema/default/quicktype.py b/head/schema-python/test/inputs/schema/pattern.schema/default/quicktype.py
index 9f1642b..c3d4d14 100644
--- a/base/schema-python/test/inputs/schema/pattern.schema/default/quicktype.py
+++ b/head/schema-python/test/inputs/schema/pattern.schema/default/quicktype.py
@@ -17,6 +17,7 @@ def to_class(c: Type[T], x: Any) -> dict:
 
 @dataclass
 class TopLevel:
+    escaped: str
     pattern1: str
     pattern2: str
     union: str
@@ -24,13 +25,15 @@ class TopLevel:
     @staticmethod
     def from_dict(obj: Any) -> 'TopLevel':
         assert isinstance(obj, dict)
+        escaped = from_str(obj.get("escaped"))
         pattern1 = from_str(obj.get("pattern1"))
         pattern2 = from_str(obj.get("pattern2"))
         union = from_str(obj.get("union"))
-        return TopLevel(pattern1, pattern2, union)
+        return TopLevel(escaped, pattern1, pattern2, union)
 
     def to_dict(self) -> dict:
         result: dict = {}
+        result["escaped"] = from_str(self.escaped)
         result["pattern1"] = from_str(self.pattern1)
         result["pattern2"] = from_str(self.pattern2)
         result["union"] = from_str(self.union)
diff --git a/base/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
index ca138e4..2cc1b9c 100644
--- a/base/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/minmaxlength.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.intersection
+#   puts top_level.empty_only
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -52,6 +52,7 @@ class InUnion < Dry::Struct
 end
 
 class TopLevel < Dry::Struct
+  attribute :empty_only,           Types::String
   attribute :intersection,         Types::String
   attribute :in_union,             Types.Instance(InUnion)
   attribute :maxlength,            Types::String
@@ -64,6 +65,7 @@ class TopLevel < Dry::Struct
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      empty_only:           d.fetch("emptyOnly"),
       intersection:         d.fetch("intersection"),
       in_union:             InUnion.from_dynamic!(d.fetch("inUnion")),
       maxlength:            d.fetch("maxlength"),
@@ -81,6 +83,7 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "emptyOnly"          => empty_only,
       "intersection"       => intersection,
       "inUnion"            => in_union.to_dynamic,
       "maxlength"          => maxlength,
diff --git a/base/schema-ruby/test/inputs/schema/pattern.schema/default/TopLevel.rb b/head/schema-ruby/test/inputs/schema/pattern.schema/default/TopLevel.rb
index a256a1b..8e217b8 100644
--- a/base/schema-ruby/test/inputs/schema/pattern.schema/default/TopLevel.rb
+++ b/head/schema-ruby/test/inputs/schema/pattern.schema/default/TopLevel.rb
@@ -4,7 +4,7 @@
 # To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
 #
 #   top_level = TopLevel.from_json! "{…}"
-#   puts top_level.pattern1
+#   puts top_level.escaped
 #
 # If from_json! succeeds, the value returned matches the schema.
 
@@ -20,6 +20,7 @@ module Types
 end
 
 class TopLevel < Dry::Struct
+  attribute :escaped,  Types::String
   attribute :pattern1, Types::String
   attribute :pattern2, Types::String
   attribute :union,    Types::String
@@ -27,6 +28,7 @@ class TopLevel < Dry::Struct
   def self.from_dynamic!(d)
     d = Types::Hash[d]
     new(
+      escaped:  d.fetch("escaped"),
       pattern1: d.fetch("pattern1"),
       pattern2: d.fetch("pattern2"),
       union:    d.fetch("union"),
@@ -39,6 +41,7 @@ class TopLevel < Dry::Struct
 
   def to_dynamic
     {
+      "escaped"  => escaped,
       "pattern1" => pattern1,
       "pattern2" => pattern2,
       "union"    => union,
diff --git a/base/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
index 3fc1e6d..0dc5182 100644
--- a/base/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/minmaxlength.schema/default/module_under_test.rs
@@ -16,6 +16,8 @@ use serde::{Serialize, Deserialize};
 #[derive(Debug, Clone, Serialize, Deserialize)]
 #[serde(rename_all = "camelCase")]
 pub struct TopLevel {
+    pub empty_only: String,
+
     pub intersection: String,
 
     pub in_union: InUnion,
diff --git a/base/schema-rust/test/inputs/schema/pattern.schema/default/module_under_test.rs b/head/schema-rust/test/inputs/schema/pattern.schema/default/module_under_test.rs
index 9073295..7ec455e 100644
--- a/base/schema-rust/test/inputs/schema/pattern.schema/default/module_under_test.rs
+++ b/head/schema-rust/test/inputs/schema/pattern.schema/default/module_under_test.rs
@@ -15,6 +15,8 @@ use serde::{Serialize, Deserialize};
 
 #[derive(Debug, Clone, Serialize, Deserialize)]
 pub struct TopLevel {
+    pub escaped: String,
+
     pub pattern1: String,
 
     pub pattern2: String,
diff --git a/base/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
index 3178124..5388f50 100644
--- a/base/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
@@ -8,6 +8,7 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val emptyOnly : String,
     val intersection : String,
     val inUnion : InUnion,
     val maxlength : String,
diff --git a/base/schema-scala3/test/inputs/schema/pattern.schema/default/TopLevel.scala b/head/schema-scala3/test/inputs/schema/pattern.schema/default/TopLevel.scala
index dd51745..1f53d6c 100644
--- a/base/schema-scala3/test/inputs/schema/pattern.schema/default/TopLevel.scala
+++ b/head/schema-scala3/test/inputs/schema/pattern.schema/default/TopLevel.scala
@@ -8,6 +8,7 @@ import cats.syntax.functor._
 type NullValue = None.type
 
 case class TopLevel (
+    val escaped : String,
     val pattern1 : String,
     val pattern2 : String,
     val union : String
diff --git a/base/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
index 419af7f..0dd7f77 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/minmaxlength.schema/default/TopLevel.scala
@@ -66,6 +66,7 @@ end JsonExt
 
 
 case class TopLevel (
+    val emptyOnly : String,
     val intersection : String,
     val inUnion : InUnion,
     val maxlength : String,
diff --git a/base/schema-scala3-upickle/test/inputs/schema/pattern.schema/default/TopLevel.scala b/head/schema-scala3-upickle/test/inputs/schema/pattern.schema/default/TopLevel.scala
index ebccd58..8b71fd2 100644
--- a/base/schema-scala3-upickle/test/inputs/schema/pattern.schema/default/TopLevel.scala
+++ b/head/schema-scala3-upickle/test/inputs/schema/pattern.schema/default/TopLevel.scala
@@ -66,6 +66,7 @@ end JsonExt
 
 
 case class TopLevel (
+    val escaped : String,
     val pattern1 : String,
     val pattern2 : String,
     val union : String
diff --git a/base/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
index a2fbe0e..6a72547 100644
--- a/base/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/minmaxlength.schema/default/TopLevel.schema
@@ -6,10 +6,15 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "emptyOnly": {
+                    "type": "string",
+                    "maxLength": 0
+                },
                 "intersection": {
                     "type": "string",
                     "minLength": 4,
-                    "maxLength": 5
+                    "maxLength": 5,
+                    "pattern": "^[a-z]+$"
                 },
                 "inUnion": {
                     "$ref": "#/definitions/InUnion"
@@ -30,7 +35,8 @@
                 "minmaxlength": {
                     "type": "string",
                     "minLength": 3,
-                    "maxLength": 5
+                    "maxLength": 5,
+                    "pattern": "^[a-z]+$"
                 },
                 "minMaxUnion": {
                     "type": "string"
@@ -38,10 +44,12 @@
                 "union": {
                     "type": "string",
                     "minLength": 3,
-                    "maxLength": 6
+                    "maxLength": 6,
+                    "pattern": "^[a-z]+$"
                 }
             },
             "required": [
+                "emptyOnly",
                 "inUnion",
                 "intersection",
                 "maxlength",
@@ -61,7 +69,8 @@
                 {
                     "type": "string",
                     "minLength": 3,
-                    "maxLength": 5
+                    "maxLength": 5,
+                    "pattern": "^[a-z]+$"
                 }
             ],
             "title": "InUnion"
diff --git a/base/schema-schema/test/inputs/schema/pattern.schema/default/TopLevel.schema b/head/schema-schema/test/inputs/schema/pattern.schema/default/TopLevel.schema
index dbe648a..399b58c 100644
--- a/base/schema-schema/test/inputs/schema/pattern.schema/default/TopLevel.schema
+++ b/head/schema-schema/test/inputs/schema/pattern.schema/default/TopLevel.schema
@@ -6,6 +6,10 @@
             "type": "object",
             "additionalProperties": {},
             "properties": {
+                "escaped": {
+                    "type": "string",
+                    "pattern": "^\\d+\\.[a-z]+$"
+                },
                 "pattern1": {
                     "type": "string",
                     "pattern": "a[.]*"
@@ -20,6 +24,7 @@
                 }
             },
             "required": [
+                "escaped",
                 "pattern1",
                 "pattern2",
                 "union"
diff --git a/base/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
index b146fbe..5dc940f 100644
--- a/base/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/minmaxlength.schema/default/quicktype.swift
@@ -7,6 +7,7 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
+    let emptyOnly: String
     let intersection: String
     let inUnion: InUnion
     let maxlength: String
@@ -17,6 +18,7 @@ struct TopLevel: Codable {
     let union: String
 
     enum CodingKeys: String, CodingKey {
+        case emptyOnly = "emptyOnly"
         case intersection = "intersection"
         case inUnion = "inUnion"
         case maxlength = "maxlength"
@@ -47,6 +49,7 @@ extension TopLevel {
     }
 
     func with(
+        emptyOnly: String? = nil,
         intersection: String? = nil,
         inUnion: InUnion? = nil,
         maxlength: String? = nil,
@@ -57,6 +60,7 @@ extension TopLevel {
         union: String? = nil
     ) -> TopLevel {
         return TopLevel(
+            emptyOnly: emptyOnly ?? self.emptyOnly,
             intersection: intersection ?? self.intersection,
             inUnion: inUnion ?? self.inUnion,
             maxlength: maxlength ?? self.maxlength,
diff --git a/base/schema-swift/test/inputs/schema/pattern.schema/default/quicktype.swift b/head/schema-swift/test/inputs/schema/pattern.schema/default/quicktype.swift
index 20c7463..78fe3a9 100644
--- a/base/schema-swift/test/inputs/schema/pattern.schema/default/quicktype.swift
+++ b/head/schema-swift/test/inputs/schema/pattern.schema/default/quicktype.swift
@@ -7,11 +7,13 @@ import Foundation
 
 // MARK: - TopLevel
 struct TopLevel: Codable {
+    let escaped: String
     let pattern1: String
     let pattern2: String
     let union: String
 
     enum CodingKeys: String, CodingKey {
+        case escaped = "escaped"
         case pattern1 = "pattern1"
         case pattern2 = "pattern2"
         case union = "union"
@@ -37,11 +39,13 @@ extension TopLevel {
     }
 
     func with(
+        escaped: String? = nil,
         pattern1: String? = nil,
         pattern2: String? = nil,
         union: String? = nil
     ) -> TopLevel {
         return TopLevel(
+            escaped: escaped ?? self.escaped,
             pattern1: pattern1 ?? self.pattern1,
             pattern2: pattern2 ?? self.pattern2,
             union: union ?? self.union
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 adc9f79..67c1f57 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
@@ -8,6 +8,7 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    emptyOnly:          string;
     intersection:       string;
     inUnion:            InUnion;
     maxlength:          string;
@@ -188,6 +189,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "emptyOnly", js: "emptyOnly", typ: "" },
         { json: "intersection", js: "intersection", typ: "" },
         { json: "inUnion", js: "inUnion", typ: u(3.14, "") },
         { json: "maxlength", js: "maxlength", typ: "" },
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 482048a..56333cf 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
@@ -8,6 +8,7 @@
 // match the expected interface, even if the JSON is valid.
 
 export interface TopLevel {
+    escaped:  string;
     pattern1: string;
     pattern2: string;
     union:    string;
@@ -181,6 +182,7 @@ function r(name: string) {
 
 const typeMap: any = {
     "TopLevel": o([
+        { json: "escaped", js: "escaped", typ: "" },
         { json: "pattern1", js: "pattern1", typ: "" },
         { json: "pattern2", js: "pattern2", typ: "" },
         { json: "union", js: "union", typ: "" },
diff --git a/base/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
index 998dd2f..83f8496 100644
--- a/base/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/minmaxlength.schema/default/TopLevel.ts
@@ -2,13 +2,14 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "intersection": z.string(),
-    "inUnion": z.union([z.number(), z.string()]),
-    "maxlength": z.string(),
-    "minlength": z.string(),
-    "minMaxIntersection": z.string(),
-    "minmaxlength": z.string(),
+    "emptyOnly": z.string().max(0),
+    "intersection": z.string().min(4).max(5).regex(new RegExp("^[a-z]+$")),
+    "inUnion": z.union([z.number(), z.string().min(3).max(5).regex(new RegExp("^[a-z]+$"))]),
+    "maxlength": z.string().max(5),
+    "minlength": z.string().min(3),
+    "minMaxIntersection": z.string().min(3).max(5),
+    "minmaxlength": z.string().min(3).max(5).regex(new RegExp("^[a-z]+$")),
     "minMaxUnion": z.string(),
-    "union": z.string(),
+    "union": z.string().min(3).max(6).regex(new RegExp("^[a-z]+$")),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
index 2352d7a..5d79dff 100644
--- a/base/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/optional-const-ref.schema/default/TopLevel.ts
@@ -10,10 +10,10 @@ export type Coordinate = z.infer<typeof CoordinateSchema>;
 export const TopLevelSchema = z.object({
     "coordinates": z.array(CoordinateSchema).optional(),
     "count": z.number().optional(),
-    "label": z.string().optional(),
+    "label": z.string().min(2).max(16).optional(),
     "requiredCoordinates": z.array(CoordinateSchema),
     "requiredCount": z.number(),
-    "requiredLabel": z.string(),
+    "requiredLabel": z.string().min(2).max(16),
     "weight": z.number().optional(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
index 56bfdd1..77a1b80 100644
--- a/base/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/optional-constraints.schema/default/TopLevel.ts
@@ -4,8 +4,8 @@ import * as z from "zod";
 export const TopLevelSchema = z.object({
     "optDouble": z.number().optional(),
     "optInt": z.number().optional(),
-    "optPattern": z.string().optional(),
-    "optString": z.string().optional(),
+    "optPattern": z.string().regex(new RegExp("^[a-z]+$")).optional(),
+    "optString": z.string().min(3).max(10).optional(),
     "reqZeroMin": z.number(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/pattern.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/pattern.schema/default/TopLevel.ts
index 99f4704..57393d0 100644
--- a/base/schema-typescript-zod/test/inputs/schema/pattern.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/pattern.schema/default/TopLevel.ts
@@ -2,8 +2,9 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "pattern1": z.string(),
-    "pattern2": z.string(),
-    "union": z.string(),
+    "escaped": z.string().regex(new RegExp("^\\d+\\.[a-z]+$")),
+    "pattern1": z.string().regex(new RegExp("a[.]*")),
+    "pattern2": z.string().regex(new RegExp("b[.]*")),
+    "union": z.string().regex(new RegExp("(b[.]*)|(c[.]*)")),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
diff --git a/base/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
index 004bf81..040a94a 100644
--- a/base/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/renaming-bug.schema/default/TopLevel.ts
@@ -78,7 +78,7 @@ export type Geometry = z.infer<typeof GeometrySchema>;
 
 export const VehicleSchema = z.object({
     "brand": z.string().optional(),
-    "id": z.string().optional(),
+    "id": z.string().min(1).optional(),
     "speed": SpeedSchema.optional(),
     "subModule": z.boolean().optional(),
     "type": VehicleTypeSchema.optional(),
@@ -94,7 +94,7 @@ export type Shape = z.infer<typeof ShapeSchema>;
 
 export const BerrySchema = z.object({
     "color": ColorSchema.optional(),
-    "name": z.string().optional(),
+    "name": z.string().min(1).optional(),
     "shapes": z.array(ShapeSchema).optional(),
 });
 export type Berry = z.infer<typeof BerrySchema>;
@@ -107,7 +107,7 @@ export const FruitSchema = z.object({
 export type Fruit = z.infer<typeof FruitSchema>;
 
 export const TopLevelSchema = z.object({
-    "version": z.string().optional(),
+    "version": z.string().regex(new RegExp("^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}$")).optional(),
     "fruits": z.array(FruitSchema).optional(),
     "vehicles": z.array(VehicleSchema).optional(),
 });
diff --git a/base/schema-typescript-zod/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts b/head/schema-typescript-zod/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
index 11252d0..ec522f2 100644
--- a/base/schema-typescript-zod/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
+++ b/head/schema-typescript-zod/test/inputs/schema/schema-constraints.schema/default/TopLevel.ts
@@ -2,7 +2,7 @@ import * as z from "zod";
 
 
 export const TopLevelSchema = z.object({
-    "minMaxLength": z.string(),
+    "minMaxLength": z.string().min(5).max(5),
     "percent": z.number(),
 });
 export type TopLevel = z.infer<typeof TopLevelSchema>;
