Contactable\SWV
TelRule::validate
Метод класса: TelRule{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$TelRule = new TelRule(); $TelRule->validate( $context );
- $context(обязательный)
- .
Код TelRule::validate() TelRule::validate CF7 6.1.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;
}