The Form API appears to support validation, see FormBuilder::validateForm. If it's as simple as using that I'm happy to write a MR, but maybe I'm missing something here?
- 🇺🇸United States jrockowitz Brooklyn, NY
An MR would be welcomed. I am hoping it is a simple one.
- last update
over 1 year ago 531 pass, 4 fail - @gaddman opened merge request.
- Status changed to Needs review
over 1 year ago 10:26pm 7 July 2023 - last update
over 1 year ago 531 pass, 4 fail - @gaddman opened merge request.
- last update
over 1 year ago 531 pass, 4 fail - Status changed to Active
over 1 year ago 10:56pm 7 July 2023 - 🇺🇸United States jrockowitz Brooklyn, NY
That is fine. The failing tests hint that this maybe more complex than we initially thought.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Liam Morland → made their first commit to this issue’s fork.
- last update
about 1 year ago 533 pass, 4 fail - Status changed to Needs work
about 1 year ago 9:29pm 5 October 2023 - 🇺🇸United States jrockowitz Brooklyn, NY
The catch-22 is this is a major change that might have to go into the next major release. Only critical issues will be release blockers.
- 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
This line is the problem:
\Drupal::formBuilder()->validateForm($form_id, $form_object, $form_state);
The second parameter to
::validateForm()
needs to be "An associative array containing the structure of the form". The changes in the merge request are instead sending an object of typeWebformSubmissionForm
. - last update
about 1 year ago 533 pass, 4 fail - Status changed to Needs review
about 1 year ago 4:31pm 6 October 2023 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
Fix for the problem mentioned in #15.
- Status changed to Needs work
about 1 year ago 4:45pm 6 October 2023 - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
This will require a closer look. Not a release blocker; if it is too disruptive of a change, it may need to wait for the next minor release, 6.3.x.