This tutorial will show you how to implement inline server-side field validation in Rails with only a few lines of IntercoolerJS.
Here are the steps for implementing inline validation
div
with an ID so
we can target it for appending.
ic-post-to
annotation to the input and target the wrapping div with an
ic-target
annotation.
Here's a diff between the standard rails form code and the IntercoolerJS inline validation version:
https://github.com/LeadDyno/intercooler-tutorial-app/commit/b94118fbb5cb0ccd065c6e27d316de3e29313bce