diff --git a/fapi_validation.info.yml b/fapi_validation.info.yml
index 5e43435..21de264 100644
--- a/fapi_validation.info.yml
+++ b/fapi_validation.info.yml
@@ -3,5 +3,6 @@ type: module
 description: Form API Validation.
 package: Development
 core: 8.x
+core_version_requirement: ^8 || ^9
 dependencies:
   - drupal:node
diff --git a/fapiv_example/fapiv_example.info.yml b/fapiv_example/fapiv_example.info.yml
index 882aa1d..797d78a 100644
--- a/fapiv_example/fapiv_example.info.yml
+++ b/fapiv_example/fapiv_example.info.yml
@@ -3,5 +3,6 @@ type: module
 description: Form API Validation Example Form.
 package: Development
 core: 8.x
+core_version_requirement: ^8 || ^9
 dependencies:
   - fapi_validation:fapi_validation
diff --git a/fapiv_example/src/Form/SimpleForm.php b/fapiv_example/src/Form/SimpleForm.php
index 098787e..6e46234 100644
--- a/fapiv_example/src/Form/SimpleForm.php
+++ b/fapiv_example/src/Form/SimpleForm.php
@@ -97,7 +97,7 @@ class SimpleForm extends FormBase {
      * with the title.
      */
     $title = $form_state->getValue('title');
-    drupal_set_message($this->t('You specified a title of %title.', ['%title' => $title]));
+    \Drupal::messenger()->addMessage($this->t('You specified a title of %title.', ['%title' => $title]));
   }
 
 }
