Best practice for Ajax form validations (for each field before form submission)?

What is the best practice for ajax form validations using built in Rails functionality?

I’m currently using Client Side Validations gem, but got tired of handling external gem dependencies that can get stopped supported, so looking for a way to achieve same result without introducing new dependencies.

Would appreciate your thoughts. Thanks!

I’d also be interested in a gem-less way to do this.

Which dependencies are concerning? I’m using the 3-2-stable branch of the gem and the dependencies seem very low.