Get forms are always validated

Created on 7 April 2023, about 1 year ago
Updated 2 June 2023, about 1 year ago

Problem/Motivation

GET forms like views exposed form are automatically processed and so input are marked as validated, so there is the valid input class added.

core/lib/Drupal/Core/Form/FormBuilder.php::processForm():

// With GET, these forms are always submitted if requested.
    if ($form_state->isMethodType('get') && $form_state->getAlwaysProcess()) {

So the later processing marks the form element as validated.

Remaining tasks

Need to find a way to detect if the user has just arrived on a page or if we should find a way to exclude GET form or stay as it is.

πŸ› Bug report
Status

Fixed

Version

5.0

Component

Code

Created by

πŸ‡«πŸ‡·France Grimreaper France πŸ‡«πŸ‡·

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024