src/Zicht/Bundle/FrameworkExtraBundle/Twig/Extension.php
public function formHasErrors(FormView $form)
    {
        if ($form->vars['errors']->count()) {
            return true;
        }

        foreach ($form->children as $child) {
            if ($this->formHasErrors($child)) {
                return true;
            }
        }

        return false;
    }
public function formHasErrors(FormView $form)
    {
        if ($form->vars['errors']->count()) {
            return true;
        }

        foreach ($form->children as $child) {
            if ($this->formHasErrors($child)) {
                return true;
            }
        }

        return false;
    }
public function formHasErrors ( FormView $ form ) { if ( $ form -> vars [ 'errors' ] -> count ( ) ) { return true ; } foreach ( $ form -> children as $ child ) { if ( $ this -> formHasErrors ( $ child ) ) { return true ; } } return false ; }
Returns true when the form, or any of its children, has one or more errors.

@param FormView $form

@return bool
Returns true when the form or any of its children has one or more errors .