Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to validate radio button in 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.

How to validate that using the Magento default validate class.

Thanks

like image 360
MeenakshiSundaram R Avatar asked Oct 12 '13 11:10

MeenakshiSundaram R


1 Answers

i got the answer,

use validate-one-required-by-name in the class name of the radio button.

Cheers

Edit:

or

use validate-one-required on the last radio/checkbox in the group

Thanks to Rahul Tripathi

like image 149
MeenakshiSundaram R Avatar answered Oct 03 '22 21:10

MeenakshiSundaram R