gform_is_valid_url

Description

Filters the result of URL validations, allowing for custom validation to be performed.

Usage

add_filter( 'gform_is_valid_url', 'custom_validation', 10, 2 );

Parameters

  • $is_valid bool

    True if valid. False otherwise.

  • $url string

    The URL being validated.

Examples

add_filter( 'gform_is_valid_url', 'custom_validation', 10, 2 );

function custom_validation( $is_valid, $url ) {
// Do something here.
return $is_valid;
}

Placement

This code should be placed in the functions.php file of your active theme.

Source Code

This filter is located in common.php.