diff --git a/base/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
index 324a2df..9281a8b 100644
--- a/base/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/optional-constraints.schema/default/TopLevel.php
@@ -178,6 +178,9 @@ class TopLevel {
      */
     public static function validateOptPattern(?string $value): bool {
         if (!is_null($value)) {
+            if (preg_match('~^[a-z]+$~u', $value) !== 1) {
+                throw new Exception("Attribute Error");
+            }
         }
         return true;
     }
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..2f0f05c 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
@@ -45,6 +45,9 @@ class TopLevel {
      * @throws Exception
      */
     public static function validatePattern1(string $value): bool {
+        if (preg_match('~a[.]*~u', $value) !== 1) {
+            throw new Exception("Attribute Error");
+        }
         return true;
     }
 
@@ -92,6 +95,9 @@ class TopLevel {
      * @throws Exception
      */
     public static function validatePattern2(string $value): bool {
+        if (preg_match('~b[.]*~u', $value) !== 1) {
+            throw new Exception("Attribute Error");
+        }
         return true;
     }
 
@@ -139,6 +145,9 @@ class TopLevel {
      * @throws Exception
      */
     public static function validateUnion(string $value): bool {
+        if (preg_match('~(b[.]*)|(c[.]*)~u', $value) !== 1) {
+            throw new Exception("Attribute Error");
+        }
         return true;
     }
 
diff --git a/base/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php b/head/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
index 498eb5f..c63c411 100644
--- a/base/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
+++ b/head/schema-php/test/inputs/schema/renaming-bug.schema/default/TopLevel.php
@@ -54,6 +54,9 @@ class TopLevel {
      */
     public static function validateVersion(?string $value): bool {
         if (!is_null($value)) {
+            if (preg_match('~^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}$~u', $value) !== 1) {
+                throw new Exception("Attribute Error");
+            }
         }
         return true;
     }
