jquery form validation for multiple radio buttons

Hi Experts,

I'm new in asp.net. In my web form screen have implemented  jquery validation, but not checking multiple radio option button  required validation with rules and message in single form..

Example :

option 1. Gender
    a.Male
    b.Female

option 2.Family
  a.Single
  b.Married
  c.Other

Plz guide me or send me related links.


Thanks.
codeoxygenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

leakim971PluritechnicianCommented:
What miss on this page : http://jquery.bassistance.de/validate/demo/radio-checkbox-select-demo.html
?

$(document).ready(function() {
	$("#form1").validate();
});

Open in new window


<form class="cmxform" id="form1" method="get" action="" novalidate="novalidate">
	<fieldset>
        
		<fieldset>
			<legend>Gender</legend>
			<label for="gender_male">
				<input type="radio" id="gender_male" value="m" name="gender" required="">
				Male
			</label>
			<label for="gender_female">
				<input type="radio" id="gender_female" value="f" name="gender">
				Female
			</label>
			<label for="gender" class="error">Please select your gender</label>
		</fieldset>
                
		<fieldset>
			<legend>Family</legend>
			<label for="family_single">
				<input type="radio" id="family_single" value="s" name="family" required="">
				Single
			</label>
			<label for="family_married">
				<input type="radio" id="family_married" value="m" name="family">
				Married
			</label>
			<label for="family_other">
				<input type="radio" id="family_other" value="o" name="family">
				Other
			</label>
			<label for="family" class="error">Please select your family status.</label>
		</fieldset>
                
    </fieldset>

</form>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
codeoxygenAuthor Commented:
here i had attached in my file. how i give the condition of radio option?
plz guide me.
JQuerySample.aspx
0
leakim971PluritechnicianCommented:
you mean you CAN'T start from what I posted?
Use HTML radio instead asp radiobutton

else add this in your document ready block :
$("#<%= Male.ClientID %>").find(":radio").attr("required","");

Open in new window

0
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

codeoxygenAuthor Commented:
here i had attched file download from that link : http://jquery.bassistance.de/validate/demo/radio-checkbox-select-demo.html.

but not working. what mistake did in my attached file? and

How to use asp.radio button validation?, plz guide me.
radio-checkbox-select-demo.html
jquery.validate.js
jquery.js
0
codeoxygenAuthor Commented:
Plz anybody help.
0
leakim971PluritechnicianCommented:
but not working. what mistake did in my attached file?

If you just download the file I think the mistake come from how you put them on your server so could you provide a link to your own radio-checkbox-select-demo.html on your own server?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.