Use of $form['actions']['submit']['#validate'] ?

Created on 17 July 2024, 5 months ago

Problem/Motivation

Is there a reason that this module overrides the standard validation declaration by the user form? By default it just has $form['validate'] populated and not $form['actions']['submit']['#validate'] https://git.drupalcode.org/project/hide_revision_field/-/blob/8.x-2.x/hi...

I noticed this because Password Policy stopped validating. It just adds to the core validation array https://git.drupalcode.org/project/password_policy/-/blob/4.0.x/password... it does do other checks in the validation. So maybe this was the reason you attached it only to the button? But then how is it to know you're going to add a validation handler to the button?

Trying to work out who should update code to play with who here. You're first port of call as feels like it's not working like 'core does it'.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇳🇱Netherlands ekes

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

Comments & Activities

Production build 0.71.5 2024