Description
Enables and disables RFC URL validation. Defaults to true. When RFC is enabled, URLs will be validated against the RFC standard. When disabled, a simple and generic URL validation will be performed.
Usage
add_filter( 'gform_rfc_url_validation', 'your_function_name', 10, 1 );
Parameters
| Parameter | Type | Description |
|---|---|---|
$use_rfc | boolean | Whether to validate URLs against the RFC standard. Defaults to true. |
Examples
Disable RFC URL validation.
add_filter( 'gform_rfc_url_validation', '__return_false' );
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?
Source Code
This filter is located in common.php.