Unverified Commit a310e7a2 authored by alexpott's avatar alexpott
Browse files

Issue #3203416 by guilhermevp, joachim: docs for...

Issue #3203416 by guilhermevp, joachim: docs for FormValidator::doValidateForm() should explain $form_id can detect recursion

(cherry picked from commit 52f5af29)
parent cca57080
...@@ -223,7 +223,9 @@ protected function finalizeValidation(&$form, FormStateInterface &$form_state, $ ...@@ -223,7 +223,9 @@ protected function finalizeValidation(&$form, FormStateInterface &$form_state, $
* not be repeated in the submission step. * not be repeated in the submission step.
* @param $form_id * @param $form_id
* A unique string identifying the form for validation, submission, * A unique string identifying the form for validation, submission,
* theming, and hook_form_alter functions. * theming, and hook_form_alter functions. Is only present on the initial
* call to the method, which receives the entire form array as the $element,
* and not on recursive calls.
*/ */
protected function doValidateForm(&$elements, FormStateInterface &$form_state, $form_id = NULL) { protected function doValidateForm(&$elements, FormStateInterface &$form_state, $form_id = NULL) {
// Recurse through all children, sorting the elements so that the order of // Recurse through all children, sorting the elements so that the order of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment