How to validate one of two Required TextBox

G

Gilles Lambert

Hi,

I've to require a value in either of two TextBox. I tried with the
CustomValidator with the function :

function MobTel(source, args) {
if ( Form1.txtTelephone.value == "" && Form1.txtMobile.value == "" ) {
args.IsValid = false;
return;
}
}
args.IsValid = true;
return;
}

But the function is not called at all despite the fact it is affected to
the Property ClientValidationFunction of the control to validate.

Should i implement the server validation or is it a way to proceed this
kind of validation ?

Thanks and best regards
Gilles
 
B

Brock Allen

What browser are you using? The client side validation only is supposed if
the browser is IE. You should always implement a server validation function
for this reason.
 
G

Gilles Lambert

I'm using IE6, with client scripts enabled. Ok for the server
validation, but i don't understand why the function is not called ?
 

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,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top