API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Form%21Fo...

FormValidator::doValidateForm()'s $form_id parameter is only present on the initial call to the method, which receives the entire form array as the $element, and not on recursive calls. This should be documented on the parameter.

CommentFileSizeAuthor
#3 3203416-3.patch916 bytesguilhermevp
#2 3203416-2.patch916 bytesguilhermevp

Comments

joachim created an issue. See original summary.

guilhermevp’s picture

Status: Active » Needs review
StatusFileSize
new916 bytes

Sending patch, please review!

guilhermevp’s picture

StatusFileSize
new916 bytes

Updated patch fixing grammar error.

hmendes’s picture

Status: Needs review » Reviewed & tested by the community

Patch from #3 was applied successfully and changed the parameter comment.
Changing it to RTBC.

alexpott’s picture

Sure we can fix this but it'd be great if someone can file a follow-up to remove the use-case. I think it's not necessary. We can check if $elements[#type] equals form instead of this. Form elements cannot be nested. It also has the advantage of being more semantic - if you're dealing with a form do the form validation path.

alexpott’s picture

Version: 9.1.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 52f5af29a8 to 9.3.x and 2c47aaa2b9 to 9.2.x. Thanks!

Backported to 9.2.x as this a docs only patch.

  • alexpott committed 52f5af2 on 9.3.x
    Issue #3203416 by guilhermevp, joachim: docs for FormValidator::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.