original_string: public function validateSubmitValue($values) {
          foreach ($this->_elements as $element) {
              if (method_exists($element, 'validateSubmitValue')) {
                  $value = $values[$element->getName()] ?? null;
                  $result = $element->validateSubmitValue($value);
                  if (!empty($result) && is_string($result)) {
                      return $result;
                  }
              }
          }
      }
code: public function validateSubmitValue($values) {
          foreach ($this->_elements as $element) {
              if (method_exists($element, 'validateSubmitValue')) {
                  $value = $values[$element->getName()] ?? null;
                  $result = $element->validateSubmitValue($value);
                  if (!empty($result) && is_string($result)) {
                      return $result;
                  }
              }
          }
      }
code_tokens: public function validateSubmitValue ( $ values ) { foreach ( $ this -> _elements as $ element ) { if ( method_exists ( $ element , 'validateSubmitValue' ) ) { $ value = $ values [ $ element -> getName ( ) ] ?? null ; $ result = $ element -> validateSubmitValue ( $ value ) ; if ( ! empty ( $ result ) && is_string ( $ result ) ) { return $ result ; } } } }
docstring: Calls the validateSubmitValue function for the containing elements and returns an error string as soon as it finds one.
  
  @param array $values Values of the containing elements.
  @return string|null Validation error message or null.
docstring_tokens: Calls the validateSubmitValue function for the containing elements and returns an error string as soon as it finds one .