Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the webform "Email confirm" element, no clientside validation is currently provided to check the two values match.
Comment | File | Size | Author |
---|---|---|---|
#4 | validate_webform_email-2900432-4.patch | 1.24 KB | Leon Kessler |
Comments
Comment #2
Leon Kessler CreditAttribution: Leon Kessler commentedPatch 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).
Comment #4
Leon Kessler CreditAttribution: Leon Kessler commentedSmall change with patch, didn't have the correct selector so validation was never actually passing. Corrected with latest patch.
Comment #6
Leon Kessler CreditAttribution: Leon Kessler commentedSwitching back to needs review as issue in test is unrelated.
Comment #7
Jelle_SWe 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
Comment #8
jrockowitz CreditAttribution: jrockowitz at The Big Blue House commentedI 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'.
Comment #9
nikunjkotechaComment #10
jrockowitz CreditAttribution: jrockowitz at The Big Blue House commentedThis was recently fixed via the webform module. @see #3138266: Email confirmation clientside validation not working