Contactable\SWV

URLRule::validatepublicCF7 1.0

Метод класса: URLRule{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$URLRule = new URLRule();
$URLRule->validate( $context );
$context(обязательный)
.

Код URLRule::validate() CF7 6.1.7

public function validate( $context ) {
	$input = $this->get_default_input();
	$input = wpcf7_array_flatten( $input );
	$input = wpcf7_strip_whitespaces( $input );
	$input = wpcf7_exclude_blank( $input );

	foreach ( $input as $i ) {
		if ( ! wpcf7_is_url( $i ) ) {
			return $this->create_error();
		}
	}

	return true;
}