src/Kunstmaan/AdminBundle/Helper/FormHelper.php
public function hasRecursiveErrorMessages(FormView $formView)
    {
        $errors = $formView->vars['errors'];

        if (is_object($errors) && $errors instanceof \Traversable) {
            $errors = iterator_to_array($errors);
        }

        if (!empty($errors)) {
            return true;
        }

        if ($formView->count()) {
            foreach ($formView->children as $child) {
                if ($this->hasRecursiveErrorMessages($child)) {
                    return true;
                }
            }
        }

        return false;
    }
public function hasRecursiveErrorMessages(FormView $formView)
    {
        $errors = $formView->vars['errors'];

        if (is_object($errors) && $errors instanceof \Traversable) {
            $errors = iterator_to_array($errors);
        }

        if (!empty($errors)) {
            return true;
        }

        if ($formView->count()) {
            foreach ($formView->children as $child) {
                if ($this->hasRecursiveErrorMessages($child)) {
                    return true;
                }
            }
        }

        return false;
    }
public function hasRecursiveErrorMessages ( FormView $ formView ) { $ errors = $ formView -> vars [ 'errors' ] ; if ( is_object ( $ errors ) && $ errors instanceof \ Traversable ) { $ errors = iterator_to_array ( $ errors ) ; } if ( ! empty ( $ errors ) ) { return true ; } if ( $ formView -> count ( ) ) { foreach ( $ formView -> children as $ child ) { if ( $ this -> hasRecursiveErrorMessages ( $ child ) ) { return true ; } } } return false ; }
Return if there are error messages.

@param FormView $formView

@return bool
Return if there are error messages .