Cześć, mam pytanie odnośnie walidacji formularzy a dokładnie chodzi o wyświetlanie wiadomości dla użytkownika. Mianowice wyświetla mi się sesji alert "{"film_name":["Wymagane!!!"]} " a chciałbym wyświetlać wiadomość tylko pod inputem a nie w sesji. może ktoś wie jak pominąć wyświetlanie błędu w sesji.
  1. $rules = [
  2. 'film_name' => 'required',
  3. ];
  4.  
  5. $customMessages = [
  6. 'film_name.required' => 'Wymagane!!!'
  7. ];
  8.  
  9. $this->validate($request, $rules, $customMessages);
  10.  


  1.  
  2. @if (\Session::has('success'))
  3. <div class="alert alert-success">
  4. <ul>
  5. {!! \Session::get('success') !!}
  6. </ul>
  7. </div>
  8. @endif
  9.  
  10. @if (\Session::has('errors'))
  11. <div class="alert alert-danger">
  12. <ul>
  13. {!! \Session::get('errors') !!}
  14. </ul>
  15. </div>
  16. @endif
  17.  
  18.  
  19.  
  20. <div class="form-group">
  21. <label for="film_name">Tytuł filmu:</label>
  22. <input type="input" class="form-control" name="film_name" id="film_name" required>
  23. @error('film_name')
  24. <div class="alert alert-danger">{{ $message }}</div>
  25. @enderror
  26. </div>