You are here

public static function WebformSubmissionForm::validateWebformSubmission in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::validateWebformSubmission()

Programmatically validate and submit a webform submission.

Parameters

\Drupal\webform\WebformSubmissionInterface $webform_submission: WebformSubmission with values and data.

Return value

array|null An array of error messages if validation fails or NULL if there are no validation errors.

File

src/WebformSubmissionForm.php, line 3180

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

public static function validateWebformSubmission(WebformSubmissionInterface $webform_submission) {
  return static::submitWebformSubmission($webform_submission, TRUE);
}