You are here

public static function WebformSubmissionForm::validateFormValues in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::validateFormValues()

Programmatically validate form values and submit a webform submission.

Parameters

array $values: An array of submission form values and data.

Return value

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

3 calls to WebformSubmissionForm::validateFormValues()
WebformDevelSubmissionApiForm::validateForm in modules/webform_devel/src/Form/WebformDevelSubmissionApiForm.php
Form validation handler.
WebformSubmissionApiTest::testApi in tests/src/Functional/WebformSubmissionApiTest.php
Test webform API.
WebformSubmissionExportImportImporter::importValidateRecord in modules/webform_submission_export_import/src/WebformSubmissionExportImportImporter.php
Validate import record submission.

File

src/WebformSubmissionForm.php, line 3182

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

public static function validateFormValues(array $values) {
  return static::submitFormValues($values, TRUE);
}