From 9fec3552f5e7a5c7a8c0cb0850d6703e84b6181f Mon Sep 17 00:00:00 2001 From: Mark Conroy Date: Thu, 16 Jan 2025 08:56:58 +0000 Subject: [PATCH] disables html5 validation --- localgov_core.module | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/localgov_core.module b/localgov_core.module index 571f490..aa0b86d 100644 --- a/localgov_core.module +++ b/localgov_core.module @@ -5,6 +5,7 @@ * LocalGovDrupal Core module file. */ +use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Installer\InstallerKernel; /** @@ -77,3 +78,10 @@ function localgov_core_localgov_post_install(): void { $defaultBlockInstaller = \Drupal::service('localgov_core.default_block_installer'); $defaultBlockInstaller->install($localgovModules); } + +/** + * Implements hook_form_alter(). + */ +function localgov_core_form_alter(&$form, FormStateInterface $form_state, $form_id): void { + $form['#attributes']['novalidate'] = 'novalidate'; +}