Contactable\SWV

TelRule::validatepublicCF7 1.0

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

Хуков нет.

Возвращает

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

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

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

Код TelRule::validate() CF7 6.0.6

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_tel( $i ) ) {
			return $this->create_error();
		}
	}

	return true;
}