Fill either Phone or Email field


On my lead page I have both an Email and a Phone field for contact.
I want the user to fill in EITHER the phone number OR the email field. (Neither are marked as required.) If the user submits the page with both blank I want to show an error asking them to fill in one of them. I tried a custom Javascript validator but it does not fire if the fields are left blank.
Any ideas appreciated!