# Validating radio buttons

**URL:** <https://forum.kirupa.com/t/validating-radio-buttons/238533>\
**Category:** Uncategorized\
**Created:** [September 12, 2007, 1:14pm UTC](https://forum.kirupa.com/t/validating-radio-buttons/238533 "2007-09-12T13:14:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aniltc](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@aniltc](https://forum.kirupa.com/u/aniltc)\
**Post date:** [September 12, 2007, 1:14pm UTC](https://forum.kirupa.com/t/validating-radio-buttons/238533/1 "2007-09-12T13:14:52Z")

</div>

hi all

i have so many group of radio buttons  
for eg :  
g1 value =1  
g1 value =2  
g1 value =3

* * *

g2 value =1  
g2 value =2  
g2 value =3

* * *

g3 value =1  
g3 value =2  
g3 value =3

* * *

…  
…  
… etc

```
      where g1,g2 and g3 are the (group)radio butons ( so same name) and the values 1,2,3.

```

if somebody choosed the same value (for eg: I choosed the first radio button from all radio groups) i have to display a error message as don’t choose same radio buttons ( I mean he should choose different radio button)  
any idea how to validate

please help me
