Yes Sharyn. And it still requires a call to the server. If the only way to validate the input is to query the db then, yes, you have to pass the rubbish to the target script. But if you want to ensure that there is actually something there to validate in the first place, and that it is the correct data type etc, then a javascript function is the answer.
Please understand, validating user input before submition to the server is the correct way to do it. Anyone who tells you different is just telling you that they can't handle client-side programming. This is not something special to web apps, it applies to any client-server app in any environment.
(God there are just too many amateurs in this web environment)