ruby-on-rails client_side_validation simple_form javascript error

二次信任 提交于 2019-12-06 09:14:37

You also need to add rails.validations.simple_form after rails.validations. You could either add as follows:

<%= javascript_include_tag "application", "rails.validations", "rails.validations.simple_form" %>

Or,

In app/assets/javascripts/application.js:

//= require rails.validations
//= require rails.validations.simple_form 

Then change javascript_include_tag to following in app/views/layouts/application.html.erb:

<%= javascript_include_tag "application" %>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!