Rails 4 client side validation

后端 未结 5 2172
挽巷
挽巷 2021-01-01 22:40

Since upgrading my site to Rails 4, the client-side-validations gem has stopped working for me. I have had a look at the various alternatives such as jquery-validation-rails

5条回答
  •  遥遥无期
    2021-01-01 22:59

    I know the question is old, but how about good old require: "require"?

    For example in view:

    <%= f.text_area :body, placeholder: "Write your review here...", class: "form-control", rows: "5", required: "required" %>
    

提交回复
热议问题