Contactable\SWV
MinNumberRule::validate()
Метод класса: MinNumberRule{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$MinNumberRule = new MinNumberRule(); $MinNumberRule->validate( $context );
- $context (обязательный)
- -
Код MinNumberRule::validate() MinNumberRule::validate CF7 5.9.8
public function validate( $context ) { $input = $this->get_default_input(); $input = wpcf7_array_flatten( $input ); $input = wpcf7_exclude_blank( $input ); $threshold = $this->get_property( 'threshold' ); if ( ! wpcf7_is_number( $threshold ) ) { return true; } foreach ( $input as $i ) { if ( wpcf7_is_number( $i ) and (float) $i < (float) $threshold ) { return $this->create_error(); } } return true; }