Skip to content

Commit b840a60

Browse files
authored
docs: update errors_list template
check for empty $errors now with the same content as https://github.com/codeigniter4/CodeIgniter4/blob/develop/user_guide_src/source/models/model/033.php
1 parent 43d81fb commit b840a60

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

  • user_guide_src/source/libraries/validation
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<div class="alert alert-danger" role="alert">
2-
<ul>
3-
<?php foreach ($errors as $error): ?>
4-
<li><?= esc($error) ?></li>
1+
<?php if (! empty($errors)): ?>
2+
<div class="alert alert-danger">
3+
<?php foreach ($errors as $field => $error): ?>
4+
<p><?= $error ?></p>
55
<?php endforeach ?>
6-
</ul>
7-
</div>
6+
</div>
7+
<?php endif ?>

0 commit comments

Comments
 (0)