如何验证magento中的单选按钮? [英] How to validate radio button in magento?
本文介绍了如何验证magento中的单选按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的自定义模块中,我有一个带有单选按钮的表单.
In my custom module I have a form which has radio buttons.
当我单击提交"按钮时,它不会验证单选按钮.
When I click the submit button it does not validate the radio button.
如何使用Magento默认验证类进行验证.
How to validate that using the Magento default validate class.
谢谢
推荐答案
我得到了答案,
在单选按钮的类名称中使用validate-one-required-by-name
.
use validate-one-required-by-name
in the class name of the radio button.
欢呼
或
在组中的最后一个单选/复选框中使用validate-one-required
use validate-one-required
on the last radio/checkbox in the group
这篇关于如何验证magento中的单选按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文