In combination with the field validation module, the validation handler added to the next button breaks other validations. it also seems to me that the handler isn't a validation handler but rather a submit handler. I will add a patch to change it to a submit handler.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

cgoffin created an issue. See original summary.

cgoffin’s picture

Attached the patch to fix broken validations.

cgoffin’s picture

Wrong handler adjusted, fixed patch attached.

cgoffin’s picture

Submit handler isn't triggered, applied fix.

cgoffin’s picture

There is a problem with the validation on the next steps. To make sure all values are on the entity object I added the validation function to the form, to be executed on each form submit.

rajdeep0826’s picture

StatusFileSize
new1.08 KB
el1_1el’s picture

Version: 8.x-1.x-dev » 8.x-1.0
Status: Active » Needs review
StatusFileSize
new2.23 KB

The patch in #6 mostly works except changing from validate to submit creates issues with multi value image and file fields in later steps causing multiple upload widgets in the field depending on how may steps into the form they are. It also creates a validation failure if a required field is in a later step.This patch should address both of those issues for 1.0. This patch should address the issue for 1.0.

if you need the patch for dev it looks like you'll just need to change '#weight' => 0.1, to '#weight' => -1, in src/FormButton.php but I have not verified that.

el1_1el’s picture

StatusFileSize
new2.17 KB

It also creates a validation failure if a required field is in a later step. My mistake. The file and image fields are an issue still.

el1_1el’s picture

nevergone’s picture

#8 tested and works well.

andrei.vesterli made their first commit to this issue’s fork.

andrei.vesterli’s picture

The patch 3066080-update-validation-8.patch was applied to the repo. Thx for your support guys!

  • andrei.vesterli committed cdb6a11 on 8.x-1.x
    Issue #3066080 by el1_1el, andrei.vesterli: Validation handler of the...
andrei.vesterli’s picture

Status: Needs review » Fixed
andrei.vesterli’s picture

Status: Fixed » Closed (fixed)
mohamed.osama’s picture

Still have the issue after applying the patch

el1_1el’s picture

Version: 8.x-1.0 » 2.0.0
StatusFileSize
new13.54 KB
new713 bytes

If anyone else finds they have custom code relying on this commit as well as the api from the 1.0.x version, or is just having other issues with the 1-2 update, and needs to update to drupal 10, I've attached a patch that restores the 1x version on 2.0 for drupal 10.

Also note that you may need to apply the patch for field_group that removes its implements_alter function from the 3.4 version