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
The exact validation plugin equivalent would be to use
"required"on those fields, like this:You can see a full list of options here. If you wanted to add a custom message and validate that it is a valid email address, you can do it like this: