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.
Clientside Validation is a really useful module, however we had a need to modify the data attributes for other clientside libraries. Would it be plausible to make the data attributes configurable, or is this beyond the scope of the module.
Thanks.
Andy Whale
Comment | File | Size | Author |
---|---|---|---|
#11 | 2855356-add-configuration-form-for-configurable-keys_11.patch | 9.26 KB | andy_w |
#10 | 2855356-add-configuration-form-for-configurable-keys.patch | 9.86 KB | andy_w |
Comments
Comment #3
nikunjkotechaHi @andywhale,
You can easily achieve this by implementing your own rule/plugin implementation of type CvValidator.
Thanks,
Nikunj
Comment #4
andy_w CreditAttribution: andy_w at Numiko commentedUnfortunately implementing our own wouldn't give us the override required, for example to function as an intermediate layer between webform and parsley.
Comment #5
andy_w CreditAttribution: andy_w at Numiko commentedError located in patch.
Comment #6
nikunjkotecha@andy_w
IMO we should add this to annotation and allow it to be configurable per rule to allow overriding for specific rules wherever required, does that approach make sense to you?
About the patch (in-case you still want to continue with this approach):
1. Any specific reason to use t()?
2. Can you please add the config in yaml with default value (used today), an update hook to initialise and update schema?
Comment #7
nikunjkotechaComment #8
andy_w CreditAttribution: andy_w at Numiko commentedAdded a configuration form, and removed "t" method and replaced with prefix / suffix (and added config defaults).
Though I am intrigued by the annotation suggestion, if we wanted to affect all of the various validators in use by webform, would we just need to add a full custom set of validators.
Comment #10
andy_w CreditAttribution: andy_w at Numiko commentedFixed issues / added schema (missed from previous comment)
Comment #11
andy_w CreditAttribution: andy_w at Numiko commentedRevised for version 4