I'm following the instructions given on FB Developer, but I just can't get client side verification to work on my registration form.
This code block is present in the body of my page:
<script src="http://connect.facebook.net/en_US/all.js#appId=000000000&xfbml=1"></script>
<fb:registration
fields="[{'name':'name'},{'name':'emailEdu','description':'Your .edu Email','type':'text'}]"
redirect-uri="http://www.lazydragonbooks.com"
onvalidate="validate">
</fb:registration>
<script>
function validate(form)
{
errors = {};
if (form.emailEdu !== "foo")
{
errors.foo = "You didn't type foo";
}
return errors;
}
</script>
EDIT:
I placed alert('foo')
as the first line in the validate function but don't get the alert so it seems the function does not get called.