Skip to content

Instantly share code, notes, and snippets.

@yuriinalivaiko
Created November 4, 2022 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriinalivaiko/c824d0c27bc923c2de3a9c84b1cf96ca to your computer and use it in GitHub Desktop.
Save yuriinalivaiko/c824d0c27bc923c2de3a9c84b1cf96ca to your computer and use it in GitHub Desktop.
Hook um_custom_field_validation_{$custom}
<?php
/**
* Hook: um_custom_field_validation_{$custom}
*
* Type: action
*
* Description: Apply custom validation for the field.
*
* @example
* @link
*
* @package um\core
* @see um_submit_form_errors_hook_()
* @since 2.0
* @version 3.0
*
* @param string $key Field key.
* @param array $field Field data.
* @param array $args Form arguments.
*/
function my_custom_field_validation( $key, $field, $args ) {
// your code here.
}
add_action( "um_custom_field_validation_{$custom}", 'my_custom_field_validation', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment