When using the webform "Email confirm" element, no clientside validation is currently provided to check the two values match.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Leon Kessler created an issue. See original summary.

Leon Kessler’s picture

Status: Active » Needs review
FileSize
1.21 KB

Patch attached that does the job. Not sure if we are putting webform specific elements into this module (there are currently no CvValidator classes in the webform module).

Status: Needs review » Needs work

The last submitted patch, 2: validate_webform_email-2900432-2.patch, failed testing. View results

Leon Kessler’s picture

Small change with patch, didn't have the correct selector so validation was never actually passing. Corrected with latest patch.

Status: Needs review » Needs work

The last submitted patch, 4: validate_webform_email-2900432-4.patch, failed testing. View results

Leon Kessler’s picture

Status: Needs work » Needs review

Switching back to needs review as issue in test is unrelated.

Jelle_S’s picture

We did this for Drupal 7 and ended up with a ton of submodules and hard to maintain code. We decided for D8 to leverage the plugin system for custom validation requirements, which means it's up to the contrib modules to decide whether or not they want to support Clientside Validation. Maybe try this as a patch against the webform module, or create a contrib module that'll contain all CV plugins to do webform validation that is not yet supported by CV core?

Thank you for your understanding

jrockowitz’s picture

I agree with #7, a dedicated webform_clientside_validation module for D8 would be a good solution.

The patches namespace should be changed from 'email_confirm' to 'webform_email_confirm'.

nikunjkotecha’s picture

Issue tags: +webform
jrockowitz’s picture

Status: Needs review » Fixed

This was recently fixed via the webform module. @see #3138266: Email confirmation clientside validation not working

Status: Fixed » Closed (fixed)

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