Submission::has_errors( int|null $element_id = null )

Checks whether there are errors, for the entire submission or a specific element.

Description

See also

Parameters

$element_id

(int|null) (Optional) If an element ID is given, only errors for that element are returned.

Default value: null

Return

(bool) True if there are errors, false otherwise.

Source

File: src/db-objects/submissions/submission.php

	public function has_errors( $element_id = null ) {
		$errors = $this->get_errors( $element_id );

		return ! empty( $errors );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.