title: password confirmation with sails.js
body: <p>I am trying to set up password confirmation in sails 0.10.0-rc9. this is for a new user sign-up. when i use the same password in both fields, console confirms it's grabbing the same passwords, then spits out the error that they don't match. I want to know what I'm missing...</p>
  
  <p>the model - user.js - looks like 
  <a href="https://github.com/mrcn/C_Express/blob/master/api/models/User.error.js" rel="nofollow">https://github.com/mrcn/C_Express/blob/master/api/models/User.error.js</a></p>
  
  <pre><code>module.exports = {
    schema: true,
    attributes: {
      name: {
        type: "string",
        required: true
      },
      email: {
        type: "string",
        email: true,
        required: true,
        unique: true
      },
      encryptedPassword: {
        type: "string"
      },
      toJSON: function() {
        var obj = this.toObject();
        delete obj.password;
        delete obj.confirmation;
        delete obj.encryptedPassword;
        delete obj._csrf;
        return obj;
      }
    },
    beforeCreate: function (values, next) {
        console.log("Called beforeCreate User ");
        console.log(values);
      if(!values.password || values.password != values.confirmation) {
        console.log("\n if statement call \n");
        return next({
          err : ["password dont match."]
        });
      }
    }
  };
  </code></pre>
  
  <p>the form looks like this: 
  <a href="https://github.com/mrcn/C_Express/blob/master/views/user/new.ejs" rel="nofollow">https://github.com/mrcn/C_Express/blob/master/views/user/new.ejs</a></p>
  
  <pre><code>  &lt;input type="text" class="form-control" placeholder="your name" name="name" required /&gt;
  
    &lt;input type="email" class="form-control" placeholder="email address" name="email" data-parsley-trigger="change" required /&gt;
  
    &lt;input type="password" class="form-control" placeholder="password" name="password" required /&gt;
  
    &lt;input type="password" class="form-control" placeholder="confirmation" name="confirmation" required /&gt;
    &lt;br /&gt;
  
    &lt;input type="submit" class="btn btn-lg btn-primary btn-block" value="Create Account" /&gt;
    &lt;input type="hidden" name="_csrf" value="&lt;% _csrf %&gt;" /&gt;
  </code></pre>
  
  <p>when i use random "wer" for everything, Console logs"</p>
  
  <pre><code>Called beforeCreate User
  { name: 'wer',
    email: 'wer@wer.com',
    password: 'wer',
    confirmation: 'wer',
    _csrf: '',
    id: null }
  
   if statement call
  
  { err: [ 'password dont match.' ] }
  </code></pre>