Welcome Guest, Not a member yet? Register   Sign In
Validation div always appears in view even if empty
#2

Try:

PHP Code:
->with('errors'$this->validator->listErrors()) 


And in the view:


PHP Code:
<?php $errors session()->getFlashdata('errors'); ?>
    <?php if ($errors): ?>
      <div class="alert alert-danger" role="alert">
        <?= $errors ?>
      </div>
    <?php endif; ?>
Reply


Messages In This Thread
RE: Validation div always appears in view even if empty - by natanfelles - 08-29-2021, 03:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB