Ok, I just found the um_submit_form_errors_hook_
hook which uses the um_submit_form_errors_hook_()
function as callback in ultimate-member/core/um-actions-form.php (at line ~150).
With this hook I can add my own (whitelist) validtions for e-mail values on registration. Seems to be the right place for me.?…At least my changes work properly there.
So, this is the Solution: I just used that hook (mentioned above) in my functions.php to add my e-mail check on top of the original checks that are made by UM.
Works like a charm.
Here is a little code snippet for adding that hook to your functions.php:
function my_awesome_submit_form_errors( $args ) {
// start your indiviual form validation here
// in case of doubt just copy some lines of code from the original um_submit_form_errors_hook_() function to get a feeling how it works
}
add_action( 'um_submit_form_errors_hook_', 'my_awesome_submit_form_errors', 10 );