Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/4.1.1'
Browse files Browse the repository at this point in the history
Release/4.1.1
  • Loading branch information
MdNadimHossain committed May 10, 2024
2 parents 33d2e7f + 2e55bcd commit c2a07fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tide_webform.module
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,13 @@ function tide_webform_webform_submission_presave(WebformSubmission $webform_subm
}
}
// SDPAP-6627 temporary fix until contrib module patch is created.
// @todo: refactior the code and submit a patch.
// Validation isolated to specific webform.
// @todo refactior the code and submit a patch.
// Look at webform issue - 3170790.
// Server side validation from API submission.
if (isset($element['#required']) && $element['#required'] == TRUE) {
if (isset($element['#required']) && $element['#required'] == TRUE && $webform->get('id') === 'tide_webform_content_rating') {
if (empty($submission_data[$key]) && $submission_data[$key] == "") {
// Throw an exception or return an error message to prevent saving the webform.
// Throw an exception to prevent saving the webform.
throw new \Exception("The required field '{$element['#title']}' is empty.");
}
}
Expand Down

0 comments on commit c2a07fb

Please sign in to comment.