2

Why won't error message display with the code below?

I can see the error message in page source code though.

@if($errors->has('slug'))
<span class="invalid-feedback" role="alert">
  <strong>{{ $errors->first('slug')}}</strong>
</span>
@endif

However this works:

@if($errors->has('slug'))
<p>{{ $errors->first('slug')}}</p>
@endif
2
  • Does class="invalid-feedback" have some logic to only show up in some cases? Check your css or js for that class. Commented Sep 10, 2019 at 15:02
  • Please show your class 'invalid-feedback' Commented Sep 10, 2019 at 15:20

1 Answer 1

2

The class "invalid-feedback" has display none in bootstrap 4. You can add the class "d-block" to display it "invalid-feedback d-block"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.