Form validations with HTML5 and modern Rails

22-Feb-2019 1824
Recently I have worked on form-validation systems in a couple of modern Rails apps, and I learned a few things along the way I would like to share.My starting point was:I wanted to use modern Rails: Webpacker, Turbolinks, remote forms and Stimulus.I wanted to leverage standard HTML form validations when they made sense.I wanted to support server-side validations.I wanted to show server-side and client-side validations consistently.I wanted to avoid ad-hoc client-side validation logic like the plague.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle