Created
November 4, 2022 12:41
-
-
Save yuriinalivaiko/4afe168092f8feefc49a7fcdfd6551c7 to your computer and use it in GitHub Desktop.
Hook um_add_error_on_form_submit_validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hook: um_add_error_on_form_submit_validation | |
* | |
* Type: action | |
* | |
* Description: Fires on the form validation before adding an error message. | |
* | |
* @example https://github.com/ultimatemember/ultimatemember/blob/master/includes/core/um-actions-form.php#L575 | |
* @link https://docs.ultimatemember.com/article/974-umadderroronformsubmitvalidation | |
* | |
* @package um\core | |
* @see um_submit_form_errors_hook_() | |
* @since 2.0 | |
* @version 3.0 | |
* | |
* @param array $field Field data. | |
* @param string $key Field key. | |
* @param array $args Form arguments. | |
*/ | |
function my_add_error_on_form_submit_validation( $field, $key, $args ) { | |
// your code here. | |
} | |
add_action( 'um_add_error_on_form_submit_validation', 'my_add_error_on_form_submit_validation', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment