simple_form icon indicating copy to clipboard operation
simple_form copied to clipboard

Inline Errors not showed on working with turbo

Open chmich opened this issue 2 years ago • 4 comments

Precheck

  • Do not use the issues tracker for help or support, try Stack Overflow.
  • For bugs, do a quick search and make sure the bug has not yet been reported
  • If you found a security bug, do not report it through GitHub. Please send an e-mail to [email protected] instead.
  • Finally, be nice and have fun!

Environment

  • Ruby 3.1.2
  • Rails 7.0.4
  • Simple Form 5.1.0
  • gem 'turbo-rails'

Current behavior

Inline errors not showed by working on turbo-rails does it depend to this stackoverflow issue

Expected behavior

should be visible

thanks, Chris

chmich avatar Oct 05 '22 17:10 chmich

I had the same issue on upgrading to Rails 7 and migrating from Turbolinks to Turbo. The solution in #1789 says that for validation errors to show, a HTTP 422 Unprocessable Entity status must be returned, e.g.

render 'new', status: :unprocessable_entity

This solved my issue, and may help you too? I can't see this documented in the README or Wiki anywhere unfortunately.

jamesds avatar Nov 08 '22 17:11 jamesds

Oh, sorry, yes, @jamesds i solved it on the same way - thanks!

chmich avatar Nov 08 '22 17:11 chmich

Should we close this issue?

cc @carlosantoniodasilva

MatheusRich avatar Sep 25 '23 17:09 MatheusRich

From my side you can close it.

chmich avatar Sep 26 '23 07:09 chmich