can we use jquery for client side validation of a custom validation control?
Posted
by Mac
on Stack Overflow
See other posts from Stack Overflow
or by Mac
Published on 2010-05-17T06:49:57Z
Indexed on
2010/05/17
10:20 UTC
Read the original article
Hit count: 122
jQuery
There are two textboxes one for email and other one for phone i have used one custom validation control so that user have to fill any one of textboxes for client side i used javascript
function ValidatePhoneEmail(source, args) {
var tboxEmail = document.getElementById('<%= tboxEmail.ClientID %>');
var tboxPhone = document.getElementById('<%= tboxPhone.ClientID %>');
if (tboxEmail.value.trim() != '' || tboxPhone.value.trim() != '') {
args.IsValid = true;
}
else {
args.IsValid = false;
}
}
how to achieve same result using jquery
© Stack Overflow or respective owner