There are two solutions.
1. The CustomValidator , as you have indicated. To avoid its requirement that
the field is not blank, do NOT assign anything to ControlToValida te. It will
fire on submit only.
2. If you think that your validation will require using the CustomValidator
frequently, my Professional Validation And More
(
http://www.peterblum.com/vam/home.aspx) helps avoid custom coding. It has
22 validators. One is the MultiConditionV alidator, which you use to combine
other validator's rules within a boolean condition. In your case, you need
the boolean condition of "Street is Required OR City is Required OR State
is Required OR Zip is Required). You will do all of this within the design
mode Properties Editor and it will even support client-side validation. My
client-side validation works on many more browsers than Microsoft's
validators too.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx
<da*****@office core.com> wrote in message
news:11******** *************@c 13g2000cwb.goog legroups.com...
I have a form where the user need to fill some fields. some of these
fields are address fields (street, city, state, zip)
i want to validate that atleast one of these fields if filled with
data. then problem is that the CustomValidator control will not check
empty fields and the RequiredFieldVa lidator control can not check
multiple controls.
How do i do this?
Thanks