Problem/Motivation

Typo in method name?

I got a notice when using back ->

Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'Drupal\webform_validation_unique\Validate\WebformValidateConstraint' does not have a method 'formSubmitPervious' in

I'm unclear if this should be formSubmitPervious or formSubmitPrevious (which would make more sense to me!)

Seems to appear in multiple places.

grep -n -R formSubmitPervious
webform_validation/src/Validate/WebformValidateConstraint.php:435: public static function formSubmitPervious(array &$form, FormStateInterface $formState): void {
webform_validation/webform_validation.module:223: 'formSubmitPervious',

Steps to reproduce

Add Unique Validation to a multipage webform - click forward and back - you should see the notice.

Comments

luke.stewart created an issue. See original summary.

liam morland’s picture

formSubmitPervious definitely sounds like a typo. I would appreciate it if you would try the fix and, if it works, make a merge request.

solideogloria’s picture

Status: Active » Needs review
StatusFileSize
new1.31 KB

Status: Needs review » Needs work

The last submitted patch, 3: webform_validation-typo-3272850-3.patch, failed testing. View results

  • Liam Morland committed 2a3694f on 2.0.x
    Issue #3272850 by solideogloria: Fix typo in method name
    
liam morland’s picture

Status: Needs work » Fixed

Thanks for the patch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.