I’ve got an issue with some form validation I was hoping to toss by you guys.
I need to validate phone number box 2/3 in in my form, RequiredFieldValidator makes it look messy so I want to write a JavaScript to handle it. Most examples I found do popup messages and that isn’t what I want in my form. This is a multiple page application so I need an idea that is clean and effective just at warning not stopping the application.
I wrote one for a server/client side validation with customervalidator but my client didn’t like the post back.
So any one have suggestions?
This was my old phone validation.
[CODE]
function PhoValidation (source, args)
{
var PHO1 = document.getElementById(“pho1”).value;
var PHO2 = document.getElementById(“pho2”).value;
var PHO3 = document.getElementById(“pho3”).value;
if ((PHO1.length == 3) || (PHO2.length == 3) || (PHO3.length == 4))
args.IsValid = true;
else
args.IsValid = false;
}
Thank you