WPCF7_Validation::is_valid()
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 );
- $name(строка|null)
- If specified, this is the name of the target field.
По умолчанию: null
Код WPCF7_Validation::is_valid() WPCF7 Validation::is valid CF7 6.0.5
public function is_valid( $name = null ) { if ( ! empty( $name ) ) { return ! isset( $this->invalid_fields[$name] ); } else { return empty( $this->invalid_fields ); } }