Yep, this is something I can add!
Okay, that would be great! Can you let me know when it’s done?
So I finally got a chance to poke around and in my own code, I do add the filter for custom validation but the priority is set to 20 and accepts two parameters. If you want your validation to take place after DTX, try a higher priority like this:
add_filter("wpcf7_validate_dynamic_number*", 'validate_dynamic_number', 30, 2); // Default is 10, DTX priority is 20
/**
* Custom DTX Number Validation
*
* Frontend validation for DTX number fields
*
* @param WPCF7_Validation $result the current validation result object
* @param WPCF7_FormTag $tag the current form tag being filtered for validation
*
* @return WPCF7_Validation a possibly modified validation result object
*/
function validate_dynamic_number($result, $tag) {
// Do something
}
Let me know if that works!
Hi,
Okay thanks, should I update the plugin to a newer version then?
I also need this for dynamic text if this is possible.
Kind regards
Davy
No, I mean using the hook you tried earlier should work if you set the priority to be something higher than 20
That works, thanks a lot!