title: Extjs Confirm Password
body: <p>I have two password fields and am trying to confirm they are the same before allowing the post to happen.  Here is my code, it's returning "Passwords do not match!" every time no matter what.  When I do an <code>alert(pass1)</code> after my <code>var pass1 = ...</code> line, it gives me <code>undefined</code>.  I've also tried <code>var pass1 = formPanel.findField("txt_newPIN").getValue()</code> and it returns the same thing.  Here's the code:</p>
  
  <pre><code>    {
      fieldLabel:"PIN/Password",
      actionText:"Edit",
      fieldValue:"****",
      dialog:new MyAccount.DialogBox({
          id:"win_editPIN",
          name:"editPIN",
          headerContent:"Edit Password:",
          updateURL:"/uiapi/myaccount/setAccountPIN",
          items:[{
              id:"txt_currentPIN",
              name: "currentPIN",
              fieldLabel: "Current Password",
              validationEvent:"blur",
              allowBlank: false,
              maxLength:20,
              inputType:"password"
          },{
              id:"txt_newPIN",
              name: "newPIN",
              fieldLabel: "New Password",
              vtype:"confirmPassword",
              validationEvent:"blur",
              allowBlank: false,
              maxLength:20,
              inputType:"password"
          },{
              id:"txt_confirmPIN",
              fieldLabel: "Confirm Password",
              vtype:"confirmPassword",
              validationEvent:"blur",
              initialPin:"txt_newPIN",
              allowBlank: false,
              maxLength:20,
              inputType:"password"
          }], 
  
  
   validateForm:function() {
       var formPanel = Ext.getCmp("win_editPIN").formPanel.getForm();
           // Save the fields we are going to insert values into
           var pass1 = formPanel.findField("txt_newPIN");
       var pass2 = formPanel.findField("txt_confirmPIN");
  
           if (pass1 != pass2)
               return {success:false,  errorMessage:"Passwords do not match!"}
           }
  
      })
  </code></pre>