[2nd try] Form validator problem.

G

Girish

Trying this question for the second time. Sorry for any inconvenience.
---------------------------------------------------------------------

I have 5 form fields on a webpage that I need to validate to check if they
are empty.
Heres the catch.

The form fields are divided into two groups. 2 in one group and 3 in the
other. Now the required field validation should only be on a group as a
whole.. sort of like a required group validation. To add another twist - if
one group has passed validation - the other group need not be populated.

This is my form:

US Applicants
---------------
Edu Level :
Zip Code :

International Applicants
------------------------
Edu Level:
City:
Country:

So either US Applicants group or International Applicants group should have
all their fields populated.

Is there a way to do this using a server side control? Im new to asp.net -
but it seems to me that even using the Custom field validator, its not
possible to use this cause in the custom field validator control you have to
specify the field you need to validate - and here there are 5 fields in
total.

Thanks in advance for your replies!
Girish
 
G

Gerald Klein

One way is to use required on all and when you detect a group is validated
set validated true on the other controls, but this really sounds like a
logic solution that will come from just writing it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top