[英]How do I display error messages for validation on a collection select work simple_form?
I'm on mobile so don't have access to my code until later. 我在移动设备上,因此直到以后才能访问我的代码。 But the basics are this: I have a simple_form to create/edit a listing on my site.
但是基础是这样的:我有一个simple_form在我的网站上创建/编辑列表。 Certain parameters are required.
某些参数是必需的。 I use validates presence of in the model.
我使用验证模型中的存在。 When submitting the form, if I text box that is required isn't filled out, the validation works fine, error pops up and says please fill in. When a button is not selected for one of the collection selects, nothing happens.
提交表单时,如果未填写所需的“我”文本框,则验证工作正常,错误弹出并提示“请填写”。如果未为所选集合之一选择按钮,则不会发生任何事情。 Obviously the validation is working because the form won't submit, but no error is thrown.
显然,验证是有效的,因为表单不会提交,但不会引发任何错误。 Any ideas on how to get the error to show for a collection select with radio buttons?
关于如何使错误显示给收藏集的任何想法都可以通过单选按钮选择?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.