There are two ways of getting form errors.
PHP Code:
// All Errors
$this->validator->getErrors());
// Single Error
$this->validator->getError('fieldName'));
Lonnie uses this in his views.
PHP Code:
<?= view('Myth\Auth\Views\_message_block') ?>
This is his message_block code for the included view.
PHP Code:
<?php if (session()->has('message')) : ?>
<div class="alert alert-success">
<?= session('message') ?>
</div>
<?php endif ?>
<?php if (session()->has('error')) : ?>
<div class="alert alert-danger">
<?= session('error') ?>
</div>
<?php endif ?>
<?php if (session()->has('errors')) : ?>
<ul class="alert alert-danger">
<?php foreach (session('errors') as $error) : ?>
<li><?= $error ?></li>
<?php endforeach ?>
</ul>
<?php endif ?>
Look at the Myth/Auth Controller to see how he is doing the Errors.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )