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