我使用client_side_validations(3.2.0.beta.3)和client_side_validations-formtastic(2.0.0.beta.3) 在窗體上我嵌套的字段,添加與繭寶石的幫助(https://github.com/nathanvda/cocoon)和驗證引發錯誤「驗證器是未定義的」 我認爲這個問題是FromBuilder對於來自cocoon的嵌套字段並不知道client_side_validations。有沒有人有這個問題,並找出解決方案?ClientSideValidations與Cocoon
0
A
回答
0
0
添加這個JS的地方,它都應該工作:
$(form_selector).on('cocoon:after-insert', function() {
$(form_selector).enableClientSideValidations();
});
相關問題
- 1. 驗證與ClientSideValidations寶石
- 2. Rails cocoon f.fields_for not working
- 3. Cocoon JS和Kinetic JS
- 4. Rails Cocoon替代顏色
- 5. Rails Cocoon只讀字段
- 6. Rails Cocoon Gem:未定義方法'new_record?'在link_to_remove_association與邪惡
- 7. ClientSideValidations不在Twitter中顯示Bootstrap-Modal Rails 3.2
- 8. 在ajax中使用ClientSideValidations gem呈現部分
- 9. Rails - Cocoon - 簡單窗體 - 不渲染
- 10. Ruby on Rails:使用Cocoon的Selectize.js
- 11. cocoon 2.1.x到2.2.0遷移指南
- 12. apache cocoon piplines中的全局變量
- 13. 在Cocoon/XSLT中包含外部.js
- 14. Rails 3.1。需要Cocoon link_to_add_association示例
- 15. Rails - Cocoon Gem - 填充外鍵id
- 16. 使用cocoon請求規範nested_attributes形式
- 17. Cocoon gem:如何限制關聯數量
- 18. Cocoon字段不受JS影響
- 19. Rails,Cocoon:從父項設置嵌套形式的值
- 20. Rails + Cocoon:更新嵌套資源而不是銷燬它
- 21. 如何讀取Apache Cocoon 2.1句柄Json請求體
- 22. 通過關聯simple_form和cocoon找不到has_many
- 23. Rails 4,Cocoon,ERB Template,如何在Edit Action中選擇一個options_from_collection_for_select?
- 24. Rails 5,簡單字段用於嵌套資源的Cocoon gem
- 25. 當使用cocoon字段渲染窗體時Rails轉義javascript
- 26. 使用Cocoon和Jquery在fields_for內更新字段
- 27. 如何使用Quartz Scheduler和Cocoon設置記錄器級別?
- 28. 如何使用cocoon在Rails中克隆子對象?
- 29. 使用Cocoon gem預填充嵌套字段
- 30. Rails 5,Cocoon Gem - 嵌套窗體內嵌套形式
感謝信息 – 2012-08-07 12:24:59
嗨Link_er,其實我設法得到它與嵌套的領域大多是工作的客戶端驗證繭。我一直犯的錯誤是沒有在我的application.js中包含這些文件。你設法弄清楚了嗎? – 2012-08-07 15:53:44
你沒有包含哪些文件? – 2012-08-08 05:28:49