title: Facebook Register Plugin - Form submitting even though validation fails?
body: <p>I'm using the Facebook Registration Plugin (<a href="http://developers.facebook.com/docs/plugins/registration/" rel="nofollow">http://developers.facebook.com/docs/plugins/registration/</a>) to register users for our site. The problem is I can't seem to get custom validation working and was wondering whether it's a mistake on my part or something wrong with Facebook.</p>
  
  <p>This is the XFBML code that I'm using:</p>
  
  <pre><code>&lt;fb:registration
      fields="[{'name':'name'},
               {'name':'email'}, 
               {'name':'password','description':'Enter a password','type':'text'}]"
      redirect-uri="http://local.dev"
      onvalidate="validateFacebookRegistrationForm"&gt;
  &lt;/fb:registration&gt;
  </code></pre>
  
  <p>and I have a global function called validateFacebookRegistrationForm which has the following code in it:</p>
  
  <pre><code>function validateFacebookRegistrationForm(form) {
      errors = {};
  
      if (form.password == "") {
          errors.password = "No Password Entered";
      }
  
      return errors;
  }
  </code></pre>
  
  <p>I would expect hitting the register button on the form would do nothing and the validation message would show up... instead I get a popup like this:</p>
  
  <p><a href="http://i.imgur.com/ERxw3.jpg" rel="nofollow">http://i.imgur.com/ERxw3.jpg</a></p>
  
  <p>Once the popup is closed, the form is validated ... and the error message shows. Clicking register again will not submit the form until the errors have been fixed - which is the how the form should behave in the first instance!</p>