Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sets form to no-validate, so we can use Drupal validation instead #800

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions localgov.profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Enables modules and site configuration for a Localgov site installation.
*/

use Drupal\Core\Form\FormStateInterface;

/**
* Implements hook_page_attachments().
*/
Expand Down Expand Up @@ -45,3 +47,10 @@ function localgov_post_install_task(): void {
$hook();
});
}

/**
* Implements hook_form_alter().
*/
function localgov_form_alter(&$form, FormStateInterface $form_state, $form_id): void {
$form['#attributes']['novalidate'] = 'novalidate';
}
Loading