Created
August 3, 2012 09:05
-
-
Save Spoygg/3246111 to your computer and use it in GitHub Desktop.
Symfony 1.4 get all form errors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul class="error_list"> | |
<?php foreach( $form->getGlobalErrors() as $name => $error ) : ?> | |
<li><?php echo $name ?> : <?php echo $error ?></li> | |
<?php endforeach ?> | |
<?php $errors = $form->getErrorSchema()->getErrors() ?> | |
<?php if ( count($errors) > 0 ) : ?> | |
<?php foreach( $errors as $name => $error ) : ?> | |
<li><?php echo $name ?> : <?php echo $error ?></li> | |
<?php endforeach ?> | |
<?php endif ?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment