Skip to content
This repository has been archived by the owner on Feb 26, 2018. It is now read-only.

Enhancement/get all errors #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rickycheers
Copy link

Hi.

I think I'd be very nice to have a way to check if a form contains errors and a way to retrieve all of them. This would be helpful to know the state of a form and update the UI accordingly.

For example:

<?php if ($form->hasErrors()): ?>
    <span class="error">The form contains the following errors, please fix.</span>
    <ul>
    <?php foreach ($form->hasErrors() as $error): ?>
        <li><?php echo $error; ?></li>
    <?php endforeach; ?>
    </ul>
<?php endif; ?>

@coveralls
Copy link

coveralls commented Jun 22, 2016

Coverage Status

Coverage increased (+0.05%) to 94.699% when pulling 837e799 on rickycheers:enhancement/get-all-errors into 8056cea on adamwathan:master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants