acf_validation::get_errorspublicACF 5.0.0

get_errors

This function will return validation errors

Method of the class: acf_validation{}

No Hooks.

Returns

(Array|true|false).

Usage

$acf_validation = new acf_validation();
$acf_validation->get_errors();

Changelog

Since 5.0.0 Introduced.

acf_validation::get_errors() code ACF 6.0.4

function get_errors() {

	// bail early if no errors
	if ( empty( $this->errors ) ) {
		return false;
	}

	// return
	return $this->errors;

}