WPCF7_Validation::is_valid()publicCF7 1.0

Returns true if the target field is valid.

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

Хуков нет.


true|false. True if the target field has no error. If no target is specified, returns true if all fields are valid. Otherwise false.


$WPCF7_Validation = new WPCF7_Validation();
$WPCF7_Validation->is_valid( $name );
If specified, this is the name of the target field.
По умолчанию: null

Код WPCF7_Validation::is_valid() CF7 5.8.7

public function is_valid( $name = null ) {
	if ( ! empty( $name ) ) {
		return ! isset( $this->invalid_fields[$name] );
	} else {
		return empty( $this->invalid_fields );