Drupal 10: Getting A Custom Form Validation Handler To Run First
23rd May 2023
In order to get a form validation handler to run first we need to put it at the beginning of the validation handler array. This is done using array_unshift.
Here is an example of setting a form validation to the login form using a hook_form_FORM_ID_alter() hook.
Add new comment